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
DarkKnightOP13mo ago
Hmm Im still having trouble with that
DarkKnight
DarkKnightOP13mo ago
No description
Thijmen
Thijmen13mo ago
That is some laravel problem
DarkKnight
DarkKnightOP13mo ago
Okk, thanks for the help fixed

Did you find this page helpful?