根据http://gastonheim.blogspot.com/2013/09/laravel-integrar-sentry-y-administrator.html,我尝试将Sentry与Administrator(frozennode)合并。我希望当我登录时,检查后我会重定向到管理员管理员面板,但它不会发生。我更改了routes.php
的代码,但它在我的视图中搜索了管理员页面。如何将登录页面连接到管理员管理页面?
Route::post('user/login', function()
{
$credentials = array(
'email' => Input::get('email'),
'password' => Input::get('password'),
);
$remember = Input::get('remember') ? true : false;
$user = SentryTest::authenticate($credentials, $remember);
$adminUrl = Config::get('administrator::administrator.title');
return View::make($adminUrl); /// in this part? which path I should give it?
});
Route::post('user/logout', function()
{
SentryTest::logout();
return Redirect::to('user/login');
});
Route::get('Admin',function(){
return View::make('hello');
});
答案 0 :(得分:0)
好吧我只是通过改变代码
来解决它 $adminUrl = Config::get('administrator::administrator.title');
return View::make($adminUrl);
到
return Redirect::to('admin');