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)
Next steps
Now that you have your first toast working, explore more advanced features:Server-side usage
Learn more about using the PHP API
Client-side usage
Explore Vue and React APIs
Configuration
Customize toast behavior and appearance
TypeScript support
Full type definitions and interfaces