我的整个应用程序是在 Laravel 5.2 中制作的,工作得很好,但是当我尝试通过以下命令获取路由列表时:
php artisan 路线:列表
它向我显示以下错误:
[ReflectionException] 类
App\Http\Controllers\AuthController 不存在
我也尝试添加命名空间:
Route::group(['middleware' => ['web'], 'namespace' => 'Auth'], function () {
Route::auth();
});
然后它向我显示以下错误:
[反射异常]
类 App\Http\Controllers\Auth\Auth\AuthController 不存在
我的路线文件是:
Route::group(['middleware' => ['web'], 'namespace'=>'Auth'], function() {
Route::auth();
});
更新:Router.php 的内容
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');
}
请帮忙!谢谢