How to get the last insert id in laravel query builder.
-
Neel Bhardwaj
-
07-Feb-2022
-
0 comments
-
156
$id = DB::table('table-name')->insertGetId(
['name' => 'abc', 'email' => 'test@test.com']
);
"Programming isn't about what you know,
it's about what you can figure out.”
Leave a reply
Thanks for comment. Your comment are shown after approve by ADMIN. THANKS!!
There is some server issue. Please try again. THANKS!!
Fatal error: Cannot declare class Connection, because the name is already in use in /home/d8ouyzxnuef4/public_html/thecoderjob.com/cj_admin/classes/Connection.php on line 3
Recent comments