Download the PHP package genealabs/laravel-messenger without Composer
On this page you can find all versions of the php package genealabs/laravel-messenger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download genealabs/laravel-messenger
More information about genealabs/laravel-messenger
Files in genealabs/laravel-messenger
Package laravel-messenger
Short Description Flash notification module for Laravel.
License MIT
Informations about the package laravel-messenger
Messenger for Laravel
Goal
To provide a drop-in, application-wide alerting functionality to display various types of alerts and notifications to the user in response to their actions.
Prerequisites
- Bootstrap 3 or 4
- Laravel 5.5 or 5.6
- PHP >= 7.1.3
Features
- Feedback notifications in form of bootstrap alerts or modals.
- Send notifications from facade, app IoC reference, or blade directive.
- Display notification easily via a blade command.
Installation
Nothing else needs to be done, as the service provider and facades will be auto-loaded.
Configuration
If you need to make changes to the default configuration, run the following
command to publish the configuration file config\genealabs-laravel-messenger.php
:
After that you can configure the configuration according to your needs:
Usage
-
Trigger an alert using either the facade/IoC helper, or a blade directive in another view:
- Add the placeholder to your layout blade file:
Parameters
message
string|required
The body of the message you want to deliver to your user. This may contain HTML. If you add links, be sure to add the appropriate classes for the framework you are using.
title
string | optional | default: ''
Title of the notification, will be inserted as an <h4>
tag, can also include
HTML. Again, keep in mind to add any framework-specific formatting yourself.
level
string | optional | default: 'info'
If provided, must be one of the following: 'info', 'success', 'warning', 'danger'.
autoHide
boolean | optional | default: false
Allows you to let the notification disappear automatically after 15 seconds. If autoHide is false, the user will be provided a close button in the alert.
framework
string | optional | default: 'bootstrap3'
Specify the framework you are using. Right now it only supports 'bootstrap3' or 'bootstrap4'.
type
string | optional | default: 'alert'
Invoke any of the available alert modes. Currently only supports 'alert' or 'modal'.
All versions of laravel-messenger with dependencies
illuminate/session Version ^7.0
jenssegers/model Version ^1.3