Download the PHP package palpalani/laravel-toastr without Composer
On this page you can find all versions of the php package palpalani/laravel-toastr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download palpalani/laravel-toastr
More information about palpalani/laravel-toastr
Files in palpalani/laravel-toastr
Package laravel-toastr
Short Description Implements toastr.js for Laravel projects
License MIT
Homepage https://github.com/palpalani/laravel-toastr
Informations about the package laravel-toastr
Laravel Toastr
Implements toastr.js for Laravel. Toastr.js is a Javascript library for non-blocking notifications.
Installation
NPM
To install a plugin via npm run
Composer
You can also install the package via composer:
Configuration
Publish the config file with
This is the contents of the published config file:
If you want, edit config/toastr.php
and set the options
array to whatever you want to pass to Toastr (this step is optional). These options are set as
the default options and can be overridden by passing an array of options to any of the methods in the Usage section.
Usage
Include jQuery, toastr.js and plugin styles in your master view template.
Link to toastr.min.css:
Link to toastr.min.js:
After everything is done, insert the string below in your template just before body closing tag or after toastr.js script instantiated in your file.
Then use these methods in your controllers to insert a toast:
Toastr::warning($message, $title = null, $options = [])
- add a warning toastToastr::error($message, $title = null, $options = [])
- add an error toastToastr::info($message, $title = null, $options = [])
- add an info toastToastr::success($message, $title = null, $options = [])
- add a success toastToastr::add($type: warning|error|info|success, $message, $title = null, $options = [])
- add a toastToastr::clear()
- clear all current toasts don't forget to use it
For a list of available options, see toastr.js' documentation.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Credits
- palPalani
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-toastr with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/session Version ^10.0|^11.0|^12.0