Skip to content

A simple package for flashing messages to views in Laravel 5+.

Notifications You must be signed in to change notification settings

xutl/laravel-notify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-notify

A simple package for flashing messages to views in Laravel 5+.

License Latest Stable Version Total Downloads

Installation

First, require the package using composer like so:

composer require xutl/laravel-notify

Add the service provider and alias in the app.php file in Laravel.

'providers' => [
    ...
    XuTL\Notify\FlashNotifyServerProvider::class,
],

...

'aliases' => [
  	...
  	'Notify' => XuTL\Notify\Notify::class,
],

Usage

To use Notify, simple add use Notify at the top of your php file and then call it using the Notify facade.

Notify::info('This is an info message');
Notify::success('This is a success message');
Notify::warning('This is a warning message');
Notify::error('This is an error message');

You can also add a title to the message if you would like:

Notify::error($message, $title); // By default, the $title variable is set to null.
Notify::error('Something is broken', 'ERROR MESSAGE');

About

A simple package for flashing messages to views in Laravel 5+.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published