count(); } public static function form(Form $form): Form { return $form ->schema([ TextInput::make('uuid')->disabled()->columnSpan(4), TextInput::make('failed_at')->disabled(), TextInput::make('id')->disabled(), TextInput::make('connection')->disabled(), TextInput::make('queue')->disabled(), // make text a little bit smaller because often a complete Stack Trace is shown: Textarea::make('exception')->disabled()->columnSpan(4)->extraInputAttributes(['style' => 'font-size: 80%;']), PrettyJsonField::make('payload')->disabled()->columnSpan(4), ])->columns(4); } public static function table(Table $table): Table { return $table ->defaultSort('id', 'desc') ->columns([ TextColumn::make('id')->sortable()->searchable()->toggleable(), TextColumn::make('failed_at')->sortable()->searchable(false)->toggleable(), TextColumn::make('exception') ->sortable() ->searchable() ->toggleable() ->wrap() ->limit(200) ->tooltip(fn (FailedJob $record) => "{$record->failed_at} UUID: {$record->uuid}; Connection: {$record->connection}; Queue: {$record->queue};"), TextColumn::make('uuid')->sortable()->searchable()->toggleable(isToggledHiddenByDefault: true), TextColumn::make('connection')->sortable()->searchable()->toggleable(isToggledHiddenByDefault: true), TextColumn::make('queue')->sortable()->searchable()->toggleable(isToggledHiddenByDefault: true), ]) ->filters([]) ->bulkActions([ BulkAction::make('retry') ->icon('heroicon-o-arrow-path') ->label('Retry selected') ->requiresConfirmation() ->action(function (Collection $records): void { /** @var FailedJob $record */ foreach ($records as $record) { Artisan::call("queue:retry {$record->uuid}"); } Notification::make() ->title("{$records->count()} jobs have been pushed back onto the queue.") ->success() ->send(); }), DeleteBulkAction::make(), ]) ->actions([ DeleteAction::make(), ViewAction::make(), Action::make('retry') ->icon('heroicon-o-arrow-path') ->label('Retry') ->requiresConfirmation() ->action(function (FailedJob $record): void { Artisan::call("queue:retry {$record->uuid}"); Notification::make() ->title("The job with uuid '{$record->uuid}' has been pushed back onto the queue.") ->success() ->send(); }), ]); } public static function getPages(): array { return [ 'index' => ListFailedJobs::route('/'), 'view' => ViewFailedJobs::route('/{record}'), ]; } }