Reputation: 31
I have two seprate table for authentication. Following middleware pointing to different table:
$this->middleware('auth:admin'); // - admins
$this->middleware('auth'); // - user
The solution i need :
$this->middleware('auth')
" middleware $this->middleware('auth')
" I want to login both
admin and user. Currently admin and user login from diffrent
middleware I have shown above.For this, in which file and where I need to change in my project folder?
Upvotes: 1
Views: 285
Reputation: 50481
If you want to have both "guards" be checked you can just pass multiple guards to the auth
middleware.
$this->middleware('auth:web,admin');
This will spin through the guards passed and if any of them produce a user it will set that guard as the default moving forward.
Upvotes: 1