select last laravel code example
Example 1: get the last saved row in a table laravel
$last = DB::table('items;)->latest()->first();
Example 2: eloquent using last()
Model::latest()->first();
$last = DB::table('items;)->latest()->first();
Model::latest()->first();