65963/error-class-found-laravel-when-changing-namespace-laravel
I am having this error when moving User.php to Models/User.php
local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Fatal error: Class '\App\User' not found vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php:126
Hello @kartik
Go to config/auth.php and change App\User:class to App\Models\User::class.
'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\Models\User::class, ],
Also change the namespace of User.php model
namespace App\Models;
Try to reload composer autloaded classes.
composer dump-autoload
Class ‘App\Http\Controllers\Auth’ Not Found in Class ‘App\Http\Controllers\Auth’ not ...READ MORE
Hello @kartik, You need to import your model ...READ MORE
Hello @kartik, The only thing that you have ...READ MORE
Hey @kartik, yes we can keep track of ...READ MORE
Hey @kartik, First you have to go to ...READ MORE
Named route is used to give specific ...READ MORE
Hello, This is simple you just need to ...READ MORE
Hey @kartik, Named routing is another amazing feature of ...READ MORE
Hello @kartik, Run following command in your project's ...READ MORE
Hello @kartik, find this line in php.ini : ;extension=soap then ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.