mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-10-16 15:50:41 +02:00
feat: action logs (#702)
This commit is contained in:
1 parent
847189aad4
commit
ea5683d080
92 files changed
+2373
-328
No files matched your search
@@ -11,6 +11,7 @@ use App\Events\Auth\User\UserCreated;
|
||||
use App\Events\Auth\User\UserDeleted;
|
||||
use App\Events\Auth\User\UserRestored;
|
||||
use App\Events\Auth\User\UserUpdated;
|
||||
use App\Models\Admin\ActionLog;
|
||||
use App\Models\List\Playlist;
|
||||
use Database\Factories\Auth\UserFactory;
|
||||
use Filament\Models\Contracts\FilamentUser;
|
||||
@@ -223,4 +224,14 @@ class User extends Authenticatable implements MustVerifyEmail, Nameable, HasSubt
|
||||
{
|
||||
return $this->hasMany(Playlist::class, Playlist::ATTRIBUTE_USER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the action logs the user executed.
|
||||
*
|
||||
* @return HasMany
|
||||
*/
|
||||
public function action_logs(): HasMany
|
||||
{
|
||||
return $this->hasMany(ActionLog::class, ActionLog::ATTRIBUTE_USER);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user