Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/839891627/toastr-for-laravel5
toastr.js for laravel5
https://github.com/839891627/toastr-for-laravel5
composer
Last synced: 1 day ago
JSON representation
toastr.js for laravel5
- Host: GitHub
- URL: https://github.com/839891627/toastr-for-laravel5
- Owner: 839891627
- Created: 2017-03-27T03:06:15.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-27T05:52:45.000Z (almost 8 years ago)
- Last Synced: 2024-12-15T23:20:26.011Z (about 1 month ago)
- Topics: composer
- Language: PHP
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
README
### Installation
1. Run `composer require arvin/toastr-for-laravel`
2. Add `Arvin\Toastr\ToastrServiceProvider::class`, to **providers** in `config/app.php`
3. Add `'Toastr' => Arvin\Toastr\Facades\Toastr::class`, to **aliases** in `config/app.php`
4. Run `php artisan vendor:publish`### Usage
Just add this code to your blade template file:
```php
{!! Toastr::render() !!}
```
Use these methods in controllers:```php
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](http://codeseven.github.io/toastr/demo.html)