Awn*_*Ali 6 php laravel laravel-5 laravel-5.1 laravel-5.2
我的整个应用程序是在Laravel 5.2中制作的,工作正常,但是当我尝试通过以下命令获取路由列表时:
PHP的工匠路线:列表
它显示了以下错误:
[ReflectionException]类App \ Http \ Controllers \ AuthController不存在
我也尝试添加名称空间:
Route::group(['middleware' => ['web'], 'namespace' => 'Auth'], function () {
Route::auth();
});
Run Code Online (Sandbox Code Playgroud)
然后显示以下错误:
[ReflectionException]
类App \ Http \ Controllers \ Auth \ Auth \ AuthController不存在
我的路线文件是:
Route::group(['middleware' => ['web'], 'namespace'=>'Auth'], function() {
Route::auth();
});
Run Code Online (Sandbox Code Playgroud)
更新: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');
}
Run Code Online (Sandbox Code Playgroud)
请帮忙!谢谢
我无法发表评论,所以我要问你是否运行了php artisan make:auth
Laravel 5.2,你不需要在你的Routes.php
. 您所拥有的一切href="{{ url('/login') }}"