Получить последний идентификатор в Ларавеле
$last3 = DB::table('items')->latest('id')->first();
Awful Albatross
$last3 = DB::table('items')->latest('id')->first();
$last = DB::table('items')->latest()->first();
DB::getPdo()->lastInsertId();
$id = DB::table('users')->insertGetId([
'email' => 'john@example.com',
'votes' => 0
]);
DB::table('myTable')->orderBy('id','desc')->first();
$last2 = DB::table('items')->orderBy('id', 'DESC')->first();