laravel query builder insert get id code example
Example: laravel query builder get last insert id
$id = DB::table('users')->insertGetId(
['email' => '[email protected]', 'votes' => 0]
);
$id = DB::table('users')->insertGetId(
['email' => '[email protected]', 'votes' => 0]
);