haruncpi / laravel-user-activity

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

Only showing loading screen. #31

Open khushal21 opened 2 years ago

khushal21 commented 2 years ago

Right now I am using it only for user login and logout activity. I have configured User model as per documentation. Logs are getting stored in logs table (with table_name column empty) in database. But not getting loaded in admin/user-activity side. It only shows loading screen here. Am I missing anything ? User.php

<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Permission\Traits\HasRoles;
use Haruncpi\LaravelUserActivity\Traits\Loggable;

class User extends Authenticatable
{
    use HasFactory, Notifiable, HasRoles, Loggable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name',
        'email',
        'password',
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password',
        'remember_token',
    ];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];
}

logs

khayalsayeedi commented 2 years ago

Did anyone solve this issue?

robertjota commented 1 year ago

In the user-activity configuration change 'user'=>"App\User" to 'user' => "App\Models\User", that's all