Skip to content
This is a simple laravel notification build ontop of http://izitoast.marcelodolce.com/
Branch: master
Clone or download
marvinhosea updated composer
changed to dev
Latest commit 8405cfa May 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lara-izitoast updated read me and added iziToast css and js assests Jan 31, 2019
README.md updated read me and added iziToast css and js assests Jan 31, 2019
composer.json updated composer May 19, 2019

README.md

Lara-Izitoast : Laravel Notification Package

Demo Image

This is a laravel notification wrapper build with http://izitoast.marcelodolce.com javascript library.

How to use this package

Config

  • Change the configuration on lara-izitoast.php config dir.

  • Get the package via composer

composer require appslabke/lara-izitoast
  • if you are not using Laravel 5.5 or higher add the service provider in your app.php under providers, in config dir.
'providers' => [
    LaraIzitoast\LaraIzitoastServiceProvider::class,
]

If you are using Laravel 5.5 and above, the package will be auto-discovered by laravel

  • Publish Lara-Izitoast package

php artisan vendor:publish --provider="LaraIzitoast\LaraIzitoastServiceProvider"

<head>
   .....
   <link href="{{ asset('css/iziToast.css') }}" rel="stylesheet">
   .....
</head>
    <body>
    .....
    <script src="{{ asset('js/iziToast.js') }}"></script>
    .....
    <body/>
    
  • Include the package view file in Layout blade below the iziToast js

@include('vendor.lara-izitoast.toast')

Let's make a toast

  • Quick way to make a toast (notification)

notify("Quick notification");

or

notify("Let's make a toast","Toast","info","topRight");

  • Notification Methods

notify()->success("Message","Title","position", "icon);

notify()->success("Success notification test","Success","topRight");

notify()->error("Error notification test","Error","topLeft");

notify()->warning("Warning notification test","Warning","bottomLeft");

notify()->info("Info notification test","Info","bottomRight");

return view('welcome');

  • And that's it.

Contributing & License

Lara-Izitoast is distributed under the MIT license.

About Apps:Lab

https://appslab.co.ke

You can’t perform that action at this time.