-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question: How to get an ID of a (inserted/updated/deleted) record using Query Builder? #48
Comments
Laravel has a |
In laravel is this in the model of Eloquent (->getKey()) |
namespace App\Models\MongoDB\Cases; class MyModel extends Eloquent { in controller $myModel->save() |
This was referenced Nov 26, 2018
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you please help me?
DB::connection('mongodb')->collection('apiRequests')->insert($entry);
How to get that record ID?
PS:
DB::getPdo()->lastInsertId();
doesn't works :(The text was updated successfully, but these errors were encountered: