I am trying to override default logout button in my Laravel project. so I defined below code in my LoginController->logout() function. but it’s showing that my guard is not defined. so i googled a lot then I reached a solution of it. let’s see what i found on this.
Just changes below codes in your config/auth.php file. and by the way I am using old Laravel version i.e. 5.5
After changes in your guards section change in ‘providers‘ section also of your auth.php
if your problem occurs yet then please run below commands to clear your cache
php artisan config:clear php artisan config:cache
If you have any confusion on this issue then feel free to comment and if you find more issue in your L:aravel projects then comment for more resolution. i will be delighted on solving your issues.
- How to Fix ” Vue packages version mismatch:” error in Laravel 5.5 - April 15, 2021
- Laravel say that Auth guard [user] is not defined - April 15, 2021
- Laravel 5.5 Error – “The page has expired due to inactivity. Please refresh and try again.” - April 9, 2021