haruncpi / laravel-user-activity

Monitor user activity easily!
https://laravelarticle.com/laravel-user-activity
424 stars 53 forks source link

App\User not found #34

Closed iamB0rgy closed 1 year ago

iamB0rgy commented 2 years ago

Hello,

I'm getting this error.

Class "App\User" not found {"userId":1,"exception":"[object] (Error(code: 0): Class \"App\User\" not found at C:\xampp\htdocs\pherp\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\HasRelationships.php:755)

I have checked the config\auth.php and it is correct.

'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => App\Models\User::class, ],

yormy commented 2 years ago

Check the LOCATION of your actual users model : you specified App\Models\User and in the config it is without the 'models' change the config to App\Models\User

haruncpi commented 1 year ago

Write it to config/user-activity.php

 'model' => [
        'user' => "App\Models\User"
 ],