2017 © Pedro Peláez
 

library laravel-amaran

Laravel 5 Notification

image

xuma/laravel-amaran

Laravel 5 Notification

  • Saturday, June 17, 2017
  • by xuma
  • Repository
  • 5 Watchers
  • 22 Stars
  • 656 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 2 Open issues
  • 3 Versions
  • 5 % Grown

The README.md

AmaranJS Laravel 5 Package

Laravel Source License, (*1)

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

Package Demo: http://ersu.me/laravel-amaranjs, (*3)

Installation

Begin by installing the package through Composer. You can add your composer.json require section:, (*4)

"xuma/laravel-amaran": "1.1.0"

Don't forget to update composer update., (*5)

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

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., (*7)

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

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

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., (*10)

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

Adding Output View

Add required view after your jQuery and AmaranJS links., (*11)

@include('amaran::javascript')

Example:, (*12)

<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;, (*13)

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

Using AmaranJS Functions

You can use most AmaranJS functions as methods like :, (*14)

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, (*15)

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., (*16)

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

Theme Usage

Theme usage is simple just set theme name and set content as theme template array., (*17)

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][2]., (*18)

The Versions

17/06 2017

dev-master

9999999-dev

Laravel 5 Notification

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

laravel notification stylish

14/06 2017

1.1.0

1.1.0.0

Laravel 5 Notification

  Sources   Download

MIT

The Requires

 

laravel notification stylish

16/01 2016

v1.0.1

1.0.1.0

Laravel 5 Notification

  Sources   Download

MIT

The Requires

 

laravel notification stylish