agilesdesign / flasher by jrseliga

Flash messaging library for Laravel
33
0
1
Package Data
Maintainer Username: jrseliga
Maintainer Contact: jseliga@agilesdesign.com (Justin Seliga)
Package Create Date: 2016-11-22
Package Last Update: 2016-11-22
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 03:08:21
Package Statistics
Total Downloads: 33
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

StyleCI Total Downloads

flasher

Flash messaging library for Laravel

Credit to Jeffrey Way over at Laracasts. This package is highly inspired from his flash library.

Installation

Include through composer

composer require agilesdesign/flasher

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

Usage

Flash message to Session
flasher()->alert('Please login', Notifier::INFO);
Render
Bootstrap Alerts
@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
notie
@foreach($alerts->messages() as $level => $alert)
    @foreach($alert as $message)
         notie.alert(
            "@if($level == 'danger'){{ 'error' }}@else{{ $level }}@endif",
            "{{ $message }}",
            2
        );
    @endforeach
@endforeach