Skip to content

Commit

Permalink
user list last activity at
Browse files Browse the repository at this point in the history
  • Loading branch information
fzldn committed Sep 20, 2024
1 parent 10a24ab commit d3489cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/Filament/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ public static function table(Table $table): Table
->label(__('Roles'))
->counts('roles')
->sortable(),
Tables\Columns\TextColumn::make('actions_max_created_at')
->label(__('Last Activity At'))
->max('actions', 'created_at')
->since()
->dateTimeTooltip()
->sortable(),
Tables\Columns\TextColumn::make('email_verified_at')
->dateTime()
->sortable()
Expand Down
2 changes: 2 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Spatie\Activitylog\Traits\CausesActivity;
use Spatie\Permission\Traits\HasRoles;

class User extends Authenticatable implements FilamentUser
Expand All @@ -25,6 +26,7 @@ class User extends Authenticatable implements FilamentUser
}
use HasSuperAdmin;
use LogsModel;
use CausesActivity;

/**
* The attributes that are mass assignable.
Expand Down

0 comments on commit d3489cd

Please sign in to comment.