0
にはどうすればhttp://localhost:8000/customにhttp://localhost:8000/loginからデフォルトのログインURLを変更ことができますか?の変更ログインURL Laravel 5.2
にはどうすればhttp://localhost:8000/customにhttp://localhost:8000/loginからデフォルトのログインURLを変更ことができますか?の変更ログインURL Laravel 5.2
Route::auth()
で登録されたルートを変更する場合は、自分で定義する必要があります。その方法は、あなたを始めようとする懐疑的な方法です。
Route::get('custom', 'Auth\[email protected]');
Route::post('custom', 'Auth\[email protected]');
...
あなたはApp\Htp\Middleware\Authenticate
は、それは同様にこの新しい場所を知っている、あなたのauth
ミドルウェアを調整することになるでしょう。
から:
redirect()->guest('login');
へ:
redirect()->guest('custom');
OK感謝@lagbox –