alex-oliveira / ao-alert
Resources for Alerts with Laravel 5.* + Bootstrap 3
Installs: 71
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/alex-oliveira/ao-alert
Requires
- php: >=5.5.9
- laravel/framework: 5.*
This package is auto-updated.
Last update: 2025-09-26 01:12:39 UTC
README
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');