Skip to content
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

Get last inserted id when registering new user #318

Closed
ghost opened this issue Feb 18, 2021 · 1 comment
Closed

Get last inserted id when registering new user #318

ghost opened this issue Feb 18, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Feb 18, 2021

Hello,
May i ask how to get last inserted id using this library when registering?
Thank you.

@MGatner
Copy link
Collaborator

MGatner commented Jul 2, 2021

If you are working in the actual AuthController where registration happens you can use insertId(). Otherwise use the UserModel or Query Builder to load the first user sorted by ID descending.

@MGatner MGatner closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant