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

Getting the authenticated admin ID #56

Closed
worldtok opened this issue Apr 9, 2019 · 1 comment
Closed

Getting the authenticated admin ID #56

worldtok opened this issue Apr 9, 2019 · 1 comment

Comments

@worldtok
Copy link

worldtok commented Apr 9, 2019

How do I get the authenticated admin ID.
Like in laravel Auth I can just do Auth:id().

@akshay-bhagat
Copy link
Contributor

You can use Auth Guard as show below to get id of the authenticated admin...

use Auth;

Auth::guard('admin')->user()->id; // this will return the id of authenticated admin

Syntax: Auth::guard('guard_name')->user()->column_name

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

3 participants