0
我正在使用Laravel 5.3.29。我想爲身份驗證創建自定義路由。Laravel Auth自定義路由重定向到/ login登錄/(自定義路徑)/登錄
這是我的網路代碼。
Route::group(['prefix' => 'hrs'], function(){ Auth::routes(); });
Route::get('/', function() { return view('welcome'); });
Route::get('/home', '[email protected]');
我做了所有資源代碼從/ home到/ hrs/home和其他的所有資源代碼。
這是我的HomeController代碼:
public function __construct()
{ $this->middleware('auth'); }
public function index()
{ return view('home'); }
的問題時,我打本地主機/回家時,我不是在登錄發生它重定向我到localhost /登錄,而不是本地主機/小時/登錄。 redirect error pic
在哪裏必須更改重定向到localhost/hrs/login。
完美的作品。非常感謝你。 –