F
Filament12mo ago
Emaz

Notifications or Flash?

So what's the right way to do this? On a Table I have an action that takes me to a controller. I do a thing, and on success I return to the table. session()->flash('success', 'Estimate was sent successfully.'); return redirect('dash/estimates'); The flash doesn't seem to be flashing. Does Filament have the necessary flash code built in to its view? Or do I need to set that up?
3 Replies
DrByte
DrByte12mo ago
You could create an Action that calls the method that does the work that you're doing in the controller. (Ideally the controller's method calls a separate function that's "just doing the work", since you might not need some of the things a Controller does, such as checking $request etc).
Dennis Koch
Dennis Koch12mo ago
The flash doesn't seem to be flashing.
Flash just means, that it is put in session for one request. There is no displaying logic behind this
Want results from more Discord servers?
Add your server