https://laravel.com/docs/5.3/...
在官方文档中说道
If the redirect path needs custom generation logic you may define a redirectTo method instead of a redirectTo property:
下面是我LoginController中的代码:
middleware('guest', ['except' => 'logout']);
config(['app.name' => '点跃']);
}
public function index()
{
return \Auth::user();
}
protected function redirectTo()
{
die('ok');
return Redirect::route('index');
}
}
但是登录成功收任然跳转到/home

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
定义一下属性
redirectTo就可以了