How can I redirect on notifications action?

Notification::make()
->title('Saved successfully')
->success()
->body('Changes to the post have been saved.')
->actions([
\Filament\Notifications\Actions\Action::make('view')
->button()
->action($this->redirect(TestResource::getUrl('edit', ['record' => $this->record->id]))),
])
->sendToDatabase($recipient);
Notification::make()
->title('Saved successfully')
->success()
->body('Changes to the post have been saved.')
->actions([
\Filament\Notifications\Actions\Action::make('view')
->button()
->action($this->redirect(TestResource::getUrl('edit', ['record' => $this->record->id]))),
])
->sendToDatabase($recipient);
I currently have this but when i press the the View button nothing happens. This tells me that the default behavior doesnt allow for redirects. Is this at all possible to do?
5 Replies
DarkKnight
DarkKnightOP12mo ago
Hmm Im still having trouble with that
DarkKnight
DarkKnightOP12mo ago
No description
Thijmen
Thijmen12mo ago
That is some laravel problem
DarkKnight
DarkKnightOP12mo ago
Okk, thanks for the help fixed
Want results from more Discord servers?
Add your server