I moved my User
Model from App\User
to App\Models\Users
, I followed the proper instruction, the same thing working properly on Windows OS, while facing error on Ubuntu 14.04
Whenever I try to Login(When submit information)
it gives me error
FatalErrorException in /var/www/html/sms/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php
line 126: Class '\App\User' not found
I also run composer dump-autoload
command, but no luck.
Also tried this
https://stackoverflow.com/a/28516582/1216451
Here is my settings for Models
directory
composer.json
"autoload": {
"classmap": [
"database",
"app/Models"
],
"psr-4": {
"App\\": "app/"
}
},
Model Directory Structure
App/Models/
Model User.php
namespace App\Models;
Auth.php tried both lines, given below.
'model' => App\Models\User::class,
'model' => App\Models\User,
AuthController.php
use App\Models\User;
EloquentUserProvider.php path is sms/vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php line 126
public function createModel()
{
$class = '\\'.ltrim($this->model, '\\');
return new $class; //line# 126
}
Your configurations seems accurate, just reset them by using php artisan config:clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With