PHP code example of agilesdesign / flasher

1. Go to this page and download the library: Download agilesdesign/flasher 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/ */

    

agilesdesign / flasher example snippets


'providers' => [
    agilesdesign\Laravel\Flasher\Providers\FlasherServiceProvider::class,
];

flasher()->alert('Please login', Notifier::INFO);

@foreach($alerts->messages() as $level => $alert)
    @foreach($alert as $message)
    <div class="alert alert-{{ $level }}">
    	<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    	{{ $message }}
    </div>
    @endforeach
@endforeach

@foreach($alerts->messages() as $level => $alert)
    @foreach($alert as $message)
         notie.alert(
            "@if($level == 'danger'){{ 'error' }}@else{{ $level }}@endif",
            "{{ $message }}",
            2
        );
    @endforeach
@endforeach