Wallogit.com
2017 © Pedro Peláez
toastr.js for laravel5
Run composer require ryan/toastr-for-laravel, (*1)
Add Yuansir\Toastr\ToastrServiceProvider::class, to providers in config/app.php, (*2)
'Toastr' => Yuansir\Toastr\Facades\Toastr::class, to aliases in config/app.php
php artisan vendor:publish
Just add this code to your blade template file:, (*3)
{!! Toastr::render() !!}
Use these methods in controllers:, (*4)
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, (*5)