How to use toast trough laravel controller
Solved
Hi,
It's me again, i'm coming with a new question, how can i use laravel controller to set notification with toaster ?
Typically when i save data i want to notify the user that the saving was ok.
Using popToast javsicript function work but i want to set the message from laravel
Thanks
Hey,
You can do that by redirecting back and passing a session message. Example:
return back()->with(['message' => 'Successfully executed some action.', 'message_type' => 'success']);
The message type can be changed accordingly too.
Report
1















