Вставка Laravel с ID
$id = DB::table('users')->insertGetId([
'email' => 'john@example.com',
'votes' => 0
]);
Jittery Jay
$id = DB::table('users')->insertGetId([
'email' => 'john@example.com',
'votes' => 0
]);
$data = User::create(['name'=>'first']);
dd($data->id);