laravel latest value from db code example
Example: how get the latest data in database in laravel
$last = DB::table('items')->latest()->first();
$last2 = DB::table('items')->orderBy('id', 'DESC')->first();
$last = DB::table('items')->latest()->first();
$last2 = DB::table('items')->orderBy('id', 'DESC')->first();