0
votes

when I click on logout in my app i get redirected to the Laravel 5 default page. I tried to switch the url to the login and instead of an error i still get redirected to this default page. This is the code in my AuthController

public function doLogout()
{
    Auth::logout();
    Session::flush();
     return Redirect::to('login');

also the logout in my routes.php

Route::get('auth/logout', 'Auth\AuthController@getLogout');

any ideas how to redirect to the login page. thank you

1
It looks like your route is not using the doLogout method.Shaz

1 Answers

0
votes

you can use below of class

protected $redirectAfterLogout = 'auth/login';

"auth/login" is the url you can change, this is for laravel 5

the doc:

https://laravel.com/docs/5.1/authentication