Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel query builder get last insert id

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