laijim/simple-toast

an lightweight native javascript toast library

v0.0.1 2020-03-25 08:24 UTC

This package is not auto-updated.

Last update: 2024-05-03 03:12:52 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.