Can I return a pdf file in a Notification?

When a user does an action in my app, i generate a pdf. Is there any chance to put the pdf in the filament notification? Im not creating a route for it, im just returning the pdf.
Notification::make()
->title(__('Success'))
->icon('heroicon-o-check')
->iconColor('success')
->seconds(50)
->actions([
Action::make('view')
->label(__('Descargar entrada'))
->action(function () {
return response()
->streamDownload(function () use ($record) {
echo $record->generatePdfOutput();
}, __('entrada') . '.pdf');
})
->button()
,
])
->send()
;
Notification::make()
->title(__('Success'))
->icon('heroicon-o-check')
->iconColor('success')
->seconds(50)
->actions([
Action::make('view')
->label(__('Descargar entrada'))
->action(function () {
return response()
->streamDownload(function () use ($record) {
echo $record->generatePdfOutput();
}, __('entrada') . '.pdf');
})
->button()
,
])
->send()
;
1 Reply
ericmp #2
ericmp #2OP16mo ago
@ me if reply, thanks
Want results from more Discord servers?
Add your server