We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f7df34 commit b55f6fdCopy full SHA for b55f6fd
src/Resources/UserResource/Pages/ViewUser.php
@@ -157,6 +157,16 @@ public function table(Table $table): Table
157
158
return true;
159
}),
160
+
161
+ Action::make('clear_activity')
162
+ ->label(__('Clear Activity'))
163
+ ->icon(fn(): BackedEnum => Heroicon::Trash)
164
+ ->action(function (Model $record): void {
165
+ $record->traffic()->delete();
166
+ })
167
+ ->requiresConfirmation()
168
+ ->modalDescription(__('This action will delete all traffic records for this user. This action cannot be undone.'))
169
+ ->visible(fn(User $record): bool => $record->traffic()->exists() && $record->traffic()->whereNot('path', 'livewire/update')->exists()),
170
])
171
->recordAction('view')
172
->recordActions([
0 commit comments