last record get laravel code example
Example 1: get the last saved row in a table laravel
$last = DB::table('items;)->latest()->first();
Example 2: laravel get last record
return DB::table('files')->order_by('upload_time', 'desc')->first();
$last = DB::table('items;)->latest()->first();
return DB::table('files')->order_by('upload_time', 'desc')->first();