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
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
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire