Package Data | |
---|---|
Maintainer Username: | arvin |
Maintainer Contact: | arvin.cao@sunallies.com (arvin) |
Package Create Date: | 2017-03-27 |
Package Last Update: | 2017-03-27 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2025-02-09 15:04:07 |
Package Statistics | |
---|---|
Total Downloads: | 25 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
README
composer require arvin/toastr-for-laravel
Arvin\Toastr\ToastrServiceProvider::class
, to providers in config/app.php
'Toastr' => Arvin\Toastr\Facades\Toastr::class
, to aliases in config/app.php
php artisan vendor:publish
Just add this code to your blade template file:
{!! Toastr::render() !!}
Use these methods in controllers:
Toastr::warning($message, $title = null, $options = [])
Toastr::error($message, $title = null, $options = [])
Toastr::info($message, $title = null, $options = [])
Toastr::success($message, $title = null, $options = [])
Toastr::clear()
set the toaster options in config/toastr.php
, available options => toastr.js demo