arvin / toastr-for-laravel
toastr.js for laravel5
Installs: 27
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/arvin/toastr-for-laravel
This package is not auto-updated.
Last update: 2025-10-26 01:27:56 UTC
README
README
Installation
- Run
composer require arvin/toastr-for-laravel - Add
Arvin\Toastr\ToastrServiceProvider::class, to providers inconfig/app.php - Add
'Toastr' => Arvin\Toastr\Facades\Toastr::class, to aliases inconfig/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