Laravel DB Insert Get Last ID
$id = DB::table('users')
->insertGetId(
['name' => 'Akash Savani', 'email'=>'[email protected]']
);
Grumpy Gharial
$id = DB::table('users')
->insertGetId(
['name' => 'Akash Savani', 'email'=>'[email protected]']
);
$id = DB::table('users')->insertGetId(
['email' => '[email protected]', 'votes' => 0]
);