get last insert id ussing query builder in laavel 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]
);