How to change the redirect url when logging out?

后端 未结 8 2090
没有蜡笔的小新
没有蜡笔的小新 2020-12-16 16:08

I\'m working with Laravel 5 authentification system provided by default. After logging out, a user is redirected to the root page but I\'d like to change that. I managed to

8条回答
  •  醉酒成梦
    2020-12-16 16:32

    For Laravel 5,

    Open AuthController class : app/Http/Controllers/Auth/AuthController.php

    Add below property to the class

    protected $redirectAfterLogout = 'auth/login';
    

    you can change auth/login with any url.

提交回复
热议问题