Created
June 28, 2016 10:02
-
-
Save phamngsinh/3ca1f846fc07f655fd542120a84be2be to your computer and use it in GitHub Desktop.
Get lastInserId in lararavel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $deleteId = DB::getPdo()->lastInsertId(); | |
| OR | |
| $id = DB::table('table')->insertGetId( $data ); | |
| /*** | |
| * | |
| * smagic39.blogspot.com | |
| * | |
| ***/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment