toastr-5-laravel maintained by littlestarsx
Description
toastr for laravel5
Author
Last update
2020/08/28 09:43
(dev-master)
License
Downloads
1
Tags
toastr
toastr.js for laravel5
Installation
- Run composer require littlestarsx/toastr
- Add Littlestarsx\Toastr\ToastrServiceProvider::class, to providers in config/app.php
- Add 'Toastr' => Littlestarsx\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()