Download the PHP package retinens/laravel-toastr without Composer
On this page you can find all versions of the php package retinens/laravel-toastr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download retinens/laravel-toastr
More information about retinens/laravel-toastr
Files in retinens/laravel-toastr
Package laravel-toastr
Short Description This package provides an easy interface for using toastr.js in a Laravel app.
License MIT
Homepage https://github.com/retinens/laravel-toastr
Informations about the package laravel-toastr
Bootstrap 5 flash messages for your Laravel app
This package provides an easy interface for using Toastr.js messages in your Laravel app.
Installation
You can install the package via composer:
You can publish the config file with:
This is the contents of the published config file:
Optionally, you can publish the views using
Usage
Toastr should be imported in your assets and available in the window variable.
For example, in your app.js
file:
Include the component in your blade base template, after all the scripts.
Then, in your controller, call the toastr()
method to create a toast message.
The toast method accepts the title and level as optional arguments :
There are a few quick methods to modify the toast:
toastr()->success('Message')
: Set the toast level as "success".toastr()->info('Message')
: Set the toast level as "info".toastr()->error('Message')
: Set the toast level as "danger".-
toastr()->warning('Message')
: Set the toast level as "warning". toastr()->title('Message',"Toast title")
: Set the toast title.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Lucas Houssa
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-toastr with dependencies
spatie/laravel-package-tools Version ^1.9.2
illuminate/contracts Version ^9.0|^10.0|^11.0