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