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 RelationManager5 Replies
You can't use both
action()
and openUrlInNewTab()
. Other than that, I think it looks fine. What is the issue?Get error on Action. Not sure what Action?
what are you trying to do?
Add link "Pdf" to actions() to download pdf file whare printaj() is a function with domPDF $pdf = PDF::loadView('pdf.pdf1', compact('myVarialbe'));
use the actions, put a ->form([]) on the action with a ViewField:make('pdf')->view(fn() => PDF::loadView('pdf.pdf1', compact('myVarialbe'))