RelationManager actions

Hi all, Need to add print button in RelationManager actions. It should be look like: ->actions([ Action::make('printaj') ->label(__('Print')) ->icon('heroicon-o-printer') ->action('printaj') ->openUrlInNewTab(), Tables\Actions\EditAction::make(), Tables\Actions\DeleteAction::make(), ]) where printaj() is method inside RelationManager
5 Replies
Patrick Boivin
Patrick Boivin15mo ago
You can't use both action() and openUrlInNewTab(). Other than that, I think it looks fine. What is the issue?
bionative
bionativeOP15mo ago
Get error on Action. Not sure what Action?
LeandroFerreira
LeandroFerreira15mo ago
what are you trying to do?
bionative
bionativeOP15mo ago
Add link "Pdf" to actions() to download pdf file whare printaj() is a function with domPDF $pdf = PDF::loadView('pdf.pdf1', compact('myVarialbe'));
toeknee
toeknee15mo ago
use the actions, put a ->form([]) on the action with a ViewField:make('pdf')->view(fn() => PDF::loadView('pdf.pdf1', compact('myVarialbe'))
Want results from more Discord servers?
Add your server