Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

return last inserted id in laravel

$id = DB::table('users')->insertGetId([
    'email' => 'john@example.com',
    'votes' => 0
]);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #inserted #id #laravel
ADD COMMENT
Topic
Name
5+2 =