Download the PHP package brian2694/laravel-toastr without Composer
On this page you can find all versions of the php package brian2694/laravel-toastr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download brian2694/laravel-toastr
More information about brian2694/laravel-toastr
Files in brian2694/laravel-toastr
Package laravel-toastr
Short Description toastr.js for Laravel
License MIT
Homepage https://github.com/brian2694/laravel-toastr
Informations about the package laravel-toastr
Inspired in whossun/laravel-toastr..
I cloned the repository brian2694/laravel-toastr to update to Laravel 5.5
laravel-toastr
Laravel Version | Is Working? |
---|---|
10.x | Yes |
9.x | Yes |
8.x | Yes |
7.x | Yes |
6.x | Yes |
>= 5.5 | Yes |
<= 5.4 | Yes |
install
Using Composer
composer require brian2694/laravel-toastr
Laravel >= 5.5
That's it! The package is auto-discovered on 5.5 and up!
Laravel <= 5.4
Add the service provider to config/app.php
Optionally include the Facade in config/app.php if you'd like.
Options
You can set custom options for Reminder. Run:
php artisan vendor:publish
to publish the config file for toastr.
You can see toastr's documentation to custom your need.
You can use toastr() function available.
Dependencies
jQuery toast, you need to add css and js to your html.
Basic
-
Toastr::info('message', 'title', ['options']);
-
Toastr::success('message', 'title', ['options']);
-
Toastr::warning('message', 'title', ['options']);
-
Toastr::error('message', 'title', ['options']);
-
Toastr::clear();
- Toastr()->info('message', 'title', ['options']);
Then
You should add {!! Toastr::message() !!}
to your html.
Use ViteJs / script type defaults to module
You can also set Toastr to use vitejs by default by registering Toastr::useVite()
inside the AppServiceProvider
.
Upon registering, you can now use Toastr::message()
and it set the script type to module.
Contributors
We'd like to thank the following individuals for their contributions to this project:
- Antonio Bruno - Set DOC on the Facade class.
- aoradev44 - Set toastr message script type to module for using with vite