alex-oliveira/ao-alert

Resources for Alerts with Laravel 5.* + Bootstrap 3
71
Install
composer require alex-oliveira/ao-alert
Latest Version:1.0.1
PHP:>=5.5.9
License:MIT
Last Updated:Feb 14, 2017
Links: GitHub  ·  Packagist
Maintainer: alex-oliveira

Ao-Alert

Resources for Alerts with Laravel 5.1 + Bootstrap 3

1) Installation

$ composer require alex-oliveira/ao-alert

2) config/app.php

'providers' => [
    /*
     * Vendors Service Providers...
     */
    AoAlert\AlertServiceProvider::class,
],
'aliases' => [
    /*
     * Vendors Facades...
     */
    'Alert' => AoAlert\AlertFacade::class,
],

3) Using

Showing alerts in your template or view.

{!! alert()->show() !!}

Add new messages in session.

alert()->info('message');
alert()->success('message');
alert()->warning('message');
alert()->danger('message');

Add multiple messages.

alert()->info(['message a', 'message b', 'message c']);

Add message with multiple topics.

alert()->danger('message', ['topic a', 'topic b', 'topic c']);

Add new custom messages in session.

/* CSS */
.alert-custom{
    background: #ccc
}

/* PHP */
alert()->add('alert-custom', 'message');

Related Packages

alex-oliveira/ao-comments

Resources for Comments with Laravel.

8 0
hieu-le/laravel-alert

Laravel global site message system

5,703 6
gerob/alert

Alert is a package to be used with Laravel 4 API messages where you aren't passi...

56 0
alex-oliveira/ao-html

Resources for HTML with Laravel 5.1 + Bootstrap 3

30 0
cornford/alerter

An easy way to manage user alerting, providing a variety of alert options to spe...

70 16