刚刚接触 laravel ,使用 auth 验证用户登录态时,跳转登录都是指向默认路由 下面是 laravel 默认的路由 public function auth() { // Authentication Routes... $this->get('login', 'Auth\AuthController@showLoginForm'); $this->post('login', 'Auth\AuthController@login'); $this->get('logout', 'Auth\AuthController@logout');
// Registration Routes...
$this->get('register', 'Auth\AuthController@showRegistrationForm');
$this->post('register', 'Auth\AuthController@register');
// Password Reset Routes...
$this->get('password/reset/{token?}', 'Auth\PasswordController@showResetForm');
$this->post('password/email', 'Auth\PasswordController@sendResetLinkEmail');
$this->post('password/reset', 'Auth\PasswordController@reset');
}
我想改下这些路由,例如 login 改成 admin/login,请教能不能改,怎样修改
1
whahuzhihao 2016-06-24 18:43:14 +08:00
Route::group(['prefix' => '/admin',], function(){
Route::auth(); }); |