我的 routes.php 中有这段代码
Route::group(["before" => "guest"], function()
{
Route::any("/", [
"as" => "user/login",
"uses" => "UserController@loginAction"
]);
Route::any("/login", [
"as" => "login",
"uses" => "UserController@loginAction"
]);
Route::any("/request", [
"as" => "user/request",
"uses" => "UserController@requestAction"
]);
Route::any("/reset", [
"as" => "user/reset",
"uses" => "UserController@resetAction"
]);
});
Route::group(["before" => "auth"], function()
{
Route::any("/dashboard", [
"as" => "user/dashboard",
"uses" => "UserController@dashboardAction"
]);
Route::any("/users", [
"as" => "users",
"uses" => "UsersController@indexAction"
]);
Route::any("/calculations", [
"as" => "calculations",
"uses" => "CalculationsController@indexAction"
]);
Route::any("/help", [
"as" => "help",
"uses" => "GeneralController@helpAction"
]);
Route::any("/contact-us", [
"as" => "contact-us",
"uses" => "GeneralController@contactUsAction"
]);
Route::any("/settings", [
"as" => "user/settings",
"uses" => "SettingsController@indexAction"
]);
Route::any("/logout", [
"as" => "user/logout",
"uses" => "UserController@logoutAction"
]);
});
我想将尝试访问访客页面的经过身份验证的用户重定向到另一个页面,我该怎么做?我正在使用 Laravel 4