laijim / simple-toast
an lightweight native javascript toast library
v0.0.1
2020-03-25 08:24 UTC
Requires
- php: ^7.2
- ext-json: *
- laravel/framework: ^6.0|^7.0
This package is not auto-updated.
Last update: 2025-05-02 07:40:24 UTC
README
It is using native javascript, Does not depend on any other component.
Installation
The recommended approach is to install the project through Composer.
composer require laijim/simple-toast
Add service provider declare to the providers array in config/app.php
Laijim\SimpleToast\SimpleToastServiceProvider::class,
(optional) Add facade declare to the facades array in config/app.php
'SimpleToast' => Laijim\SimpleToast\Facades\SimpleToast::class,
publish resource
php artisan simple-toast:publish
#Instantiate
Controller:
\SimpleToast::toast("Hi there!"); return view('test');
View (test.blade.php):
<!doctype html> <html> <head></head> <body> </body> @include('simpleToast::html') </html>
Warning: Only modern browsers are supported.