GithubHelp home page GithubHelp logo

olubunmitosin / laravel-notifier Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 103 KB

A simple and beautiful widgets of IziToast notifier for Laravel as a package.

CSS 50.82% JavaScript 36.32% PHP 9.07% Blade 3.79%

laravel-notifier's Introduction

Laravel Notifier

Notification system for laravel ^7.* : ^8.* : ^9.* : ^10.0

Version 3.0 supports icon, image, layout and theme

Installation

First, pull in the package through Composer.

composer require kesty/laravel-notifier

And then include the service provider within app/config/app.php. (Skip this step if you are on Laravel 7.5 or above)

'providers' => [
    Kesty\LaravelNotifier\NotifierServiceProvider::class
];

At last you need to publish configs and assets.

php artisan vendor:publish --provider="Kesty\LaravelNotifier\ServiceProvider"

Setup

Insert the following after the opening of tag of your HTML For default bootstrap alert dev, use the following

@include('vendor.laravel-notifier.messages')

For Kesty Notify, use the following

@include('vendor.laravel-notifier.notify')

Controller Usage

// call the facade class
KestyNotify::info(title, body);
// or as function
kNotifier('Welcome to Laravel', 'Laravel', 'success');
kNotifier()->message('Welcome to Laravel', 'Laravel', 'info');

Test the beautiful custom version like so

kNotifier()->message('Welcome to Laravel', 'Great', null, 'fa-solid fa-check', '/assets/images/avatar.jpg', 'dark', 2);

Ensure you have an avatar image and font-awesome icon is loaded. You can use any icon of your choice, just check the icon argument to any icon you installed in your project.

You can modify /laravel-notifier/*.css to suit your needs. it's a basic iziToast styles.

laravel-notifier's People

Watchers

James Cloos avatar Olubunmi Tosin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.