Toast Push #538
-
How do the code below work?
My expectation is that when the code reaches there is toast shows but only works with page reload. And if it requires page reload then the Livewire in the title is overkill. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
There is no need for a refresh, of course. |
Beta Was this translation helpful? Give feedback.
-
To properly dispatch toasts from inside your livewire components, add the trait: use Livewire\Component; class DemoComponent extends Component Did you add it? |
Beta Was this translation helpful? Give feedback.
-
My bad, I left that part out. Works perfectly now. Thank you for the quick assist. |
Beta Was this translation helpful? Give feedback.
To properly dispatch toasts from inside your livewire components, add the trait:
use Livewire\Component;
use Usernotnull\Toast\Concerns\WireToast;
class DemoComponent extends Component
{
use WireToast; // <-- add this
Did you add it?