© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
20 replies
Pasteko

Generate a pdf from BulkAction values

Tables\Actions\Action::make('pdf')
  ->icon('heroicon-o-document-download')
  ->color('danger')
  ->label('PDF')
  ->url(fn (List $record) => route('list.pdf.download', $record))
  ->openUrlInNewTab(),
Tables\Actions\Action::make('pdf')
  ->icon('heroicon-o-document-download')
  ->color('danger')
  ->label('PDF')
  ->url(fn (List $record) => route('list.pdf.download', $record))
  ->openUrlInNewTab(),

Hello, how can y build the same document from BulkAction values with an intermediate form to set some other properties?

Tables\Actions\BulkAction::make('stickers')
  ->action(function (Collection $records, array $data): void {
  ????
  ????
  ????route('stickers.pdf.download', $data);
  })
  ->label('Stickers')
  ->color('success')
  ->icon('heroicon-s-printer')
  ->modalWidth('sm')
  ->form([
    Forms\Components\TextInput::make('start')
      ->numeric()
      ->minValue(1)      
      ->maxValue(8)
      ->label('Start')
    ])
]);
Tables\Actions\BulkAction::make('stickers')
  ->action(function (Collection $records, array $data): void {
  ????
  ????
  ????route('stickers.pdf.download', $data);
  })
  ->label('Stickers')
  ->color('success')
  ->icon('heroicon-s-printer')
  ->modalWidth('sm')
  ->form([
    Forms\Components\TextInput::make('start')
      ->numeric()
      ->minValue(1)      
      ->maxValue(8)
      ->label('Start')
    ])
]);
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Custom Bulkaction generate duplicate queries
FilamentFFilament / ❓┊help
3y ago
Retrieving form data from a BulkAction
FilamentFFilament / ❓┊help
3y ago
Url generation from BulkAction
FilamentFFilament / ❓┊help
3y ago
How to generate PDF using DomPDF?
FilamentFFilament / ❓┊help
3y ago