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(),

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')
    ])
]);
Was this page helpful?