AmaranJS stylish notification for your laravel application.

Overview

AmaranJS Laravel 5 Package

Laravel Source License

AmaranJS L5 package is a Laravel wrapper for my jquery plugin AmaranJS.You can create easy and stylish notifications with AmaranJS.

Package Demo: http://ersu.me/laravel-amaranjs

Installation

Begin by installing the package through Composer. You can add your composer.json require section:

"xuma/laravel-amaran": "1.1.0"

Don't forget to update composer update.

Once this operation is complete, simply add both the service provider and facade classes to your project's config/app.php file:

Service Provider

Xuma\Amaran\AmaranServiceProvider::class,

Facade

'Amaran' => Xuma\Amaran\Facades\Amaran::class,

Installing AmaranJS jQuery Plugin

You can choose to install AmaranJS manually or you can publish assets.

If you choose install manually, extract your AmaranJS files to public/ directory. You can find installation documentation of AmaranJS here.

You can publish assets with below command and assets will be placed in /css, /js folders.

php artisan vendor:publish --provider="Xuma\Amaran\AmaranServiceProvider" --tag="assets"

Default configuration.

If you want to use same configuration by default you can use configuration file. You can publish configuration file with below command.

php artisan vendor:publish --provider="Xuma\Amaran\AmaranServiceProvider" --tag="config"

Adding Output View

Add required view after your jQuery and AmaranJS links.

@include('amaran::javascript')

Example:

<script src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.js"></script>
<script src="js/jquery.amaran.js"></script>
@include('amaran::javascript')

Usage

Usage is very simple.If you want to use default theme;

Amaran::content(['message'=>'Hello World!'])->create();

Using AmaranJS Functions

You can use most AmaranJS functions as methods like :

Amaran::content([ 'message'=>'Hello World!'])
    ->position('top right')
    ->inEffect('slideRight')
    ->outEffect('slideBottom')
    ->sticky(true)
    ->create();

Binding Javascript Events to Element

You can define javascript events with bind() method

Amaran::content(['message'=>'Hello World!'])
    ->position('top right')
    ->bind('#start','click')
  - >create();

Using as Flash Message

Normally AmaranJS bind to current view but you can add ->flash() method for bind to redirected methods view.

Amaran::content(['message'=>'Hello World'])->flash()->create();

Theme Usage

Theme usage is simple just set theme name and set content as theme template array.

Amaran::theme('awesome ok')->content([
        'title'=>'My first funcy example!',
        'message'=>'1.4 GB',
        'info'=>'my_birthday.mp4',
        'icon'=>'fa fa-download'
    ])->create();

Little note if you want to use awesome theme you have to include font awesome.

You might also like...
Laravel notification manager

Easily manage notifications and notification subscriptions in your Laravel application.

Laravel FCM (Firebase Cloud Messaging) Notification Channel

Laravel FCM Notification Laravel FCM (Firebase Cloud Messaging) Notification Channel Use this package to send push notifications via Laravel to Fireba

Livewire Package to display Toast Notification based on TALL Stack.
Livewire Package to display Toast Notification based on TALL Stack.

livewire-toast Livewire Package to display Toast Notification based on TALL Stack. Requirements Make sure that Livewire is installed properly on your

ApnsPHP: Apple Push Notification & Feedback Provider
ApnsPHP: Apple Push Notification & Feedback Provider

ApnsPHP: Apple Push Notification & Feedback Provider A full set of open source PHP classes to interact with the Apple Push Notification service for th

A filterable git commit summary notification mailer
A filterable git commit summary notification mailer

Git commit notification A symfony application to allow receiving commit notification for all commits in a certain time period. Features: Receive one m

Bootstrap 4 & 5 replacement for jGrowl notification
Bootstrap 4 & 5 replacement for jGrowl notification

XoopsGrowl module for XOOPS CMS 2.5.11+ XoopsGrowl is a module for XOOPS CMS to configure an alternative to the jGrowl notification using Bootstrap Al

Bootstrap 4 & 5 replacement for jGrowl notification
Bootstrap 4 & 5 replacement for jGrowl notification

XoopsGrowl module for XOOPS CMS 2.5.11+ XoopsGrowl is a module for XOOPS CMS to configure an alternative to the jGrowl notification using Bootstrap Al

WordPress Notification plugin
WordPress Notification plugin

Notification This is the public repository for Notification - the WordPress plugin. This plugin allow you to send custom notifications about various e

Laravel SMS allows you to send SMS from your Laravel application using multiple sms providers, allow to add custom sms provider

Laravel SMS Laravel SMS allows you to send SMS from your Laravel application using multiple sms providers, allow to add custom sms provider Requiremen

Comments
  • Publish config file

    Publish config file

    Hey, it would be very nice if your package contains a config file where you can put defaults like theme name, default method (flash / no flash) etc in it. This way I do not have to write every time things like ...flash()->... Cheers

    opened by nicozimmermann94 6
  • Not working after redirect~

    Not working after redirect~

    This is an awesome package i'v been looking for ~ just, as the title mentioned, Not working after redirect~~it works on normal view rendering though.

    I guess you pass values to view which works fine while when redirected it requires session data which may have not been set yet.

    opened by woodytang 4
Owner
Hakan ERSU
Hakan ERSU
@Authy notification channel for @Laravel, with the ability to send in-app, sms, and call verification tokens.

Authy Notification Channel for Laravel Authy notification channel for Laravel, with the ability to send in-app, sms, and call verification tokens. Tab

Laravel Notification Channels 57 Dec 19, 2022
Google Chat - Laravel Notification Channel

Google Chat - Laravel Notification Channel This package makes it easy to send notifications using Google Chat , (formerly known as Hangouts Chat) with

Laravel Notification Channels 36 Dec 6, 2022
Laravel SMS Notification Channel

Laravel SMS Notification Channel Installation composer require guangda/laravel-sms-notification-channel env 配置 SMS_PROVIDER=yunpian SMS_SIGNATURE=【签名

Guangda 6 Dec 29, 2021
A Toast notification library for the Laravel TALL stack.

A Toast notification library for the Laravel TALL stack. You can push notifications from the backend or frontend to render customizable toasts with almost zero footprint on the published CSS/JS ????

John F 365 Jan 7, 2023
Slack notification for Laravel as it should be. Easy, fast, simple and highly testable.

Based on illuminate/mail About Laravel Slack Slack notification for Laravel as it should be. Easy, fast, simple and highly testable. Since it uses On-

Guilherme Pressutto 284 Aug 24, 2022
Lark Notification Channel for laravel.

Lark notifications channel for Laravel This package makes it easy to send Lark using the Laravel notification system. Supports 5.5+, 6.x, 7.x and 8.x.

null 1 Nov 3, 2021
Our Laravel Sendgrid Notification package

laravel-sendgrid-notification-channel Laravel Sendgrid Notification channel Installation To get started, you need to require this package: composer re

Konstruktiv B.V. 4 Feb 3, 2022
Lara-Izitoast : Laravel Notification Package

Lara-Izitoast : Laravel Notification Package This is a laravel notification wrapper build with http://izitoast.marcelodolce.com javascript library. Ho

Apps:Lab KE 34 Nov 19, 2022
Notification package for Laravel

Package is looking for maintainers Please contact me if interested. Notification package for Laravel4 / Laravel5 A simple notification management pack

Edvinas Kručas 531 Oct 12, 2022
An SMS notification channel for the PHP framework Laravel.

Laravel SMS notification channel An SMS notification channel for the PHP framework Laravel. Supported SMS gateways: 46elks Cellsynt Telenor SMS Pro Tw

Andreas 2 Jan 22, 2022