PHP code example of xuma / laravel-amaran

1. Go to this page and download the library: Download xuma/laravel-amaran library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xuma / laravel-amaran example snippets


Xuma\Amaran\AmaranServiceProvider::class,

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

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

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

@

<script src="//cdn.jsdelivr.net/jquery/2.1.3/jquery.js"></script>
<script src="js/jquery.amaran.js"></script>
@

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

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

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

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

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