在Laravel 5中我正面临这个问题.. 这是我的代码
Route::group(['middleware' => ['web']], function(){
Route::get('/login', ['as' => 'login', 'user' => 'AuthController@login']);
Route::get('/handlelogin', ['as' => 'handlelogin', 'user' => 'AuthController@handlelogin']);
});
答案 0 :(得分:1)
您有'user' => 'AuthController@login
和'user'=> 'AuthController@handlelogin'
应为'uses' =>
Route::group(['middleware' => ['web']], function(){
Route::get('/login', ['as' => 'login', 'uses' => 'AuthController@login']);
Route::get('/handlelogin', ['as' => 'handlelogin', 'uses' => 'AuthController@handlelogin']);
});