Answers for "laravel get last id db builder"

PHP
0

laravel query builder get last insert id

$id = DB::table('users')->insertGetId(
    ['email' => '[email protected]', 'votes' => 0]
);
Posted by: Guest on May-14-2020
0

laravel get last id

DB::table('myTable')->orderBy('id','desc')->first();
Posted by: Guest on July-09-2020

Code answers related to "laravel get last id db builder"

Browse Popular Code Answers by Language