Class App\\Http\\Controllers\\AuthController does not exist Laravel 5.2

余生颓废 提交于 2019-12-05 08:15:49

I cannot comment so I'm going to ask have you run php artisan make:auth and with laravel 5.2 you dont need your routes in your Routes.php. All you have to have in your href="{{ url('/login') }}"

I got the same issue and I found out what was the issue. My code was look like this:

namespace App\Http\Controllers\Auth;
namespace App\Repositories;

And I changed to this:

namespace App\Repositories;
namespace App\Http\Controllers\Auth;

Issue solved for me.

I got the same problem. Just use

Route::get('/login',[
    'uses' => 'Auth\AuthController@login',
    'as'   => 'login'
]);

In laravel 5.2 you can use php artisan make:auth , this creates a line

Route::auth() in your routes.php file. And creates all the necessary

routes.

Also your namespacing solution would probably work if you remove the Auth part from

'Auth\AuthController@showRegistrationForm'

and leave it like

'AuthController@showRegistrationForm'.

in my case just remove:

     'namespace' => 'App\Http\Controllers',

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!