minhajul / notify
Flash Notification
Installs: 130
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/minhajul/notify
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2025-11-29 02:57:05 UTC
README
Using Composer
composer require minhajul/notify
Add the service provider to config/app.php
Minhajul\Notify\NotifyServiceProvider::class,
Optionally include the Facade in config/app.php if you'd like.
'Notify' => Minhajul\Notify\Facades\Notify::class,
Usage
Basic
From your application, call the flash method with a message and type.
notify()->flash('Welcome back!', 'success');
Within a view, you can now check if a flash message exists and output it.
@if (notify()->ready()) <div class="alert-box {{ notify()->type() }}"> {{ notify()->message() }} </div> @endif
Then, in your view.
@if (notify()->ready()) <script> swal({ title: "{!! notify()->message() !!}", text: "{!! notify()->option('text') !!}", type: "{{ notify()->type() }}" }); </script> @endif