在Laravel 5中,我正面临这个问题。
这是我的代码

Route::group(['middleware' => ['web']], function(){

Route::get('/login', ['as' => 'login', 'user' => 'AuthController@login']);
Route::get('/handlelogin', ['as' => 'handlelogin', 'user' => 'AuthController@handlelogin']);
});

最佳答案

您有'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']);
    });

09-19 11:33