Laravel 5.2 - Every route redirects to the homepage

≡放荡痞女 提交于 2019-12-06 14:39:50

You need to make changes in your AuthController and put where do you want to be redirected.

Then you need to add this in every controller you have:

public function __construct() { $this->middleware('auth'); }

You have to make a blade template like auth.blade.php in resources/views. Then you need to make the view from your controller with a return like:

   public function getLogin(){
        return view(
            "auth",
            [
                'username' => username,
                'password' => password
            ]
        );
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!