Zdobądź ostatni identyfikator Laravela
$last3 = DB::table('items')->latest('id')->first();
Awful Albatross
$last3 = DB::table('items')->latest('id')->first();
DB::table('myTable')->orderBy('id','desc')->first();
$id = DB::table('users')
->insertGetId(
['name' => 'Akash Savani', 'email'=>'[email protected]']
);
$data->save();
$data->id;