How to change default redirect URL of Laravel 5 Auth filter?

后端 未结 10 1927
终归单人心
终归单人心 2020-12-04 20:17

By default if I am not logged and I try visit this in browser:

http://localhost:8000/home

It redirect me to http://localhost:8000/aut

10条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 20:40

    could you please outputs php artisan route:list please

    You are right you can set the following attributes:

    protected $loginPath = 'xxx';
    
    protected $redirectPath = 'xxx';
    
    protected $redirectAfterLogout = 'xxx';
    

    Set this attribute to you AuthController.php

提交回复
热议问题