Wallogit.com
2017 © Pedro Peláez
toastr.js for laravel5
README, (*1)
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:, (*2)
{!! Toastr::render() !!}
Use these methods in controllers:, (*3)
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, (*4)