-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Wrong value of config('auth.defaults.guard') when you're logged with another guard. #22096
Comments
Yes laravel switches the default driver used to the current used guard. |
I think that when I call the config function it returns the config value. |
Hello, I don't much about guards but I have followed this steps for a web and admin guards and it works perfectly for me, maybe you are missing the configuration of some Laravel Files, checkout this video : https://www.youtube.com/watch?v=iKRLrJXNN4M |
This is expected behavior. Laravel will switch the default guard to the current one used. |
How Do I suppose to get the default guard if I'm logged with another guard? |
I don't see how this is expected behaviour. It's confusing. |
Definitely going to need a better explanation here. Honestly baffled it's been closed.
|
Description:
When I'm logged with another guard than the default guard and I try to get the default guard value with config('auth.defaults.guard') it returns the current guard value (the guard which I'm currently logged in) rather than the real default guard value.
For example, if I have two guards 'web' and 'admin' and the default guard is 'web' and I'm logged with 'admin' when I make config('auth.defaults.guard') it returns 'admin'.
Steps To Reproduce:
Try to get the default guard value with config function when you're logged with another guard.
The text was updated successfully, but these errors were encountered: