laravel redirect if logged in

后端 未结 5 1801
孤独总比滥情好
孤独总比滥情好 2021-01-04 00:35

i am using laravel 5.1.8. i am making a login/registration system. i made a controller named AdminController and protect it with middleware.

but i am using laravel\'

5条回答
  •  清酒与你
    2021-01-04 01:32

    Add this to your AuthController:

    protected $redirectTo = '/admin';
    

    This tells all the redirect methods in the various traits to redirect there instead of to /home.

提交回复
热议问题