Flash messaging library for Laravel
Credit to Jeffrey Way over at Laracasts. This package is highly inspired from his flash library.
composer require agilesdesign/flasher
'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">×</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