Reputation: 58
After disabling registration in laravel 5.8, logout route no longer works
I replaced
Auth::routes();
in web.php with
Auth::routes(['register' => false]);
My web.php file:
use Illuminate\Support\Facades\Route;
//Auth::routes();
Auth::routes(['register' => false]);
Route::get('/', 'WelcomeController@index')->name('welcome');
The registration link goes away but I get a 500 server error when I attempt to log out at /logout page.
Upvotes: 1
Views: 1114
Reputation: 1072
I've had that problem myself, you can manually add the route.
Under
Auth::routes(['register' => false]);
place
Route::get('/logout', 'Auth\LoginController@logout')->name('logout' );
Upvotes: 1
Reputation: 1932
After updating your web.php
Run
php artisan route:clear
php artisan route:cache
Upvotes: 0