Redirects with Notifications?

I see messages in discord about it being supported, but not sure how to do it. Old way would be redirect('/dashboard')->with('success', 'You have set your password successfully.');
8 Replies
Mohamed Melouk
try this
Filament::notify('success', 'You have set your password successfully.', true);
return redirect('/dashboard');
Filament::notify('success', 'You have set your password successfully.', true);
return redirect('/dashboard');
Mark Chaney
Mark ChaneyOP2y ago
@mohamedmelouk what class are you even using there? The notify method is even available for the Filament facade. A notification would typically be Notification::make()->title('Password Updated')->success()->send(); note, i am not using the admin, just in case that is somehow specific to the admin
Mohamed Melouk
it's filament facade works in any livewire component
Mark Chaney
Mark ChaneyOP2y ago
that method isnt available. hmm nvm, regular worked. had a different problem causing it not to be seen. lol i think the alert styles by default in general are easy to miss
binaryfire
binaryfire11mo ago
@Mark Chaney Hey mate, did you manage to figure this out? I'm trying to redirect from a controller to a panel using redirect('/admin')->with('success', 'My confirmation message.') but it's not working.
Mark Chaney
Mark ChaneyOP11mo ago
@binaryfire pretty sure if my memory serves me corretly that if you do a notificaiton and then immediately do a redirect, it will show on the next page
binaryfire
binaryfire11mo ago
@Mark Chaney Thanks, that works! I tried everything except the most obvious solution lol
Mark Chaney
Mark ChaneyOP11mo ago
ha, been there
Want results from more Discord servers?
Add your server