get last inserted id in laravel 8 and update the same table id with some code code example
Example: laravel db insert get last id
$id = DB::table('users')
->insertGetId(
['name' => 'Akash Savani', 'email'=>'[email protected]']
);
$id = DB::table('users')
->insertGetId(
['name' => 'Akash Savani', 'email'=>'[email protected]']
);