Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only showing loading screen. #31

Open
khushal21 opened this issue Feb 7, 2022 · 2 comments
Open

Only showing loading screen. #31

khushal21 opened this issue Feb 7, 2022 · 2 comments

Comments

@khushal21
Copy link

khushal21 commented Feb 7, 2022

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
Copy link

khayalsayeedi commented Apr 20, 2022

Did anyone solve this issue?

@robertjota
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants