Download the PHP package andheiberg/notify without Composer
On this page you can find all versions of the php package andheiberg/notify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package notify
Notify
A site notification package for laravel.
Currently let's you easily flash notifications to the session. It also supports laravels translation package out of the box.
Table of Contents
- Installation
- Configuration
- Usage
- Adding Notifications
- Displaying Notifications
Installation
You can install the package for your Laravel project through Composer.
Register the service provider in app/config/app.php
.
Add the alias to the list of aliases in app/config/app.php
.
Configuration
The packages provides you with some configuration options.
To create the configuration file run this command in your command line app:
The configuration file will be published here: app/config/packages/andheiberg/notify/config.php
.
Usage
Adding Notifications
By default, the package has some notification types defined in its configuration file. The default types are success
, error
, warning
and info
.
Every type can be called as a function.
You can of course add your own types by adding them to your own config file. See above on how to publish the config file.
You can also pass a language tag for easy localization.
Displaying Notifications
Notify
class is just an extension of Illuminate's MessageBag
class, which means we can use all of its functionality to display messages.
Or if you'd like to display a single notification for a certain level.
If you'd like to learn more ways on how you can display messages, please take a closer look to Illuminate's MessageBag
class.
Bootstrap example
All versions of notify with dependencies
illuminate/support Version >=4.0.0, <6.0.0
illuminate/session Version >=4.0.0, <6.0.0
illuminate/config Version >=4.0.0, <6.0.0
illuminate/translation Version >=4.0.0, <6.0.0