Route.php第281行中的ReflectionException:Function()不存在

时间:2016-04-27 21:00:44

标签: php laravel

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

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

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

1 个答案:

答案 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']);
    });