0
我正在使用Laravel 4.當在會話中找到「logged_in_id」時,我希望它繼續通過波紋管書寫的路徑進行解析。Laravel重定向問題
Route::get('/{anything}', function($anything)
{
if(!Session::has('logged_in_id')) {
return View::make('user.login');
} else {
//continue to check Route::get written bellow this Routing
}
})->where('anything', '[A-Za-z0-9\/?=]+');
如果我寫Redirect::to('/'.$anything)
然後進入同一條路線,並不斷在循環重定向。有什麼辦法可以解決這個問題嗎?
則邏輯是錯誤的。你有沒有重定向? – Andreyco