ryan / toastr-for-laravel
There is no license information available for the latest version (1.1.0) of this package.
toastr.js for laravel5
1.1.0
2017-03-09 02:33 UTC
This package is not auto-updated.
Last update: 2026-03-01 02:22:47 UTC
README
Installation
-
Run
composer require ryan/toastr-for-laravel -
Add
Yuansir\Toastr\ToastrServiceProvider::class,to providers in config/app.php -
Add
'Toastr' => Yuansir\Toastr\Facades\Toastr::class,to aliases in config/app.php -
Run
php artisan vendor:publish
Usage
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()
Config
set the toaster options in config/toastr.php , available options => toastr.js demo