| Package Data | |
|---|---|
| Maintainer Username: | yuansir |
| Maintainer Contact: | yuansir@live.cn (Ryan) |
| Package Create Date: | 2016-01-21 |
| Package Last Update: | 2018-06-14 |
| Language: | PHP |
| License: | Unknown |
| Last Refreshed: | 2025-10-30 03:05:11 |
| Package Statistics | |
|---|---|
| Total Downloads: | 9,122 |
| Monthly Downloads: | 1 |
| Daily Downloads: | 0 |
| Total Stars: | 39 |
| Total Watchers: | 1 |
| Total Forks: | 12 |
| Total Open Issues: | 3 |
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
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()
set the toaster options in config/toastr.php , available options => toastr.js demo