Make sure you’ve completed the installation steps before continuing.
Server-side toast (from PHP)
The most common use case is showing a toast after a form submission or action in your Laravel controller.Use the Toast facade in your controller
Client-side toast (from Vue/React)
You can also trigger toasts from your frontend components using theuseToast() composable/hook.
- Vue 3
- React
Using the helper function
Thetoast() helper provides a fluent alternative to the facade:
Complete example
Here’s a complete example showing a form submission with validation and toast notifications:- Controller (PHP)
- Component (Vue)
- Component (React)