Laravel db insert mendapatkan ID terakhir
$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]
);