get last updated id in laravel code example
Example 1: get the last saved row in a table laravel
$last = DB::table('items;)->latest()->first();
Example 2: Get last id in laravel
$last3 = DB::table('items')->latest('id')->first();
Example 3: Get last id in laravel
$last2 = DB::table('items')->orderBy('id', 'DESC')->first();
Example 4: Get last id in laravel
$last = DB::table('items')->latest()->first();