| Package Data | |
|---|---|
| Maintainer Username: | valllabh |
| Maintainer Contact: | vallabh.joshi@gmail.com (Vallabh Joshi) |
| Package Create Date: | 2014-07-18 |
| Package Last Update: | 2014-08-05 |
| Language: | PHP |
| License: | Unknown |
| Last Refreshed: | 2025-10-22 15:05:23 |
| Package Statistics | |
|---|---|
| Total Downloads: | 10 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 0 |
| Total Watchers: | 1 |
| Total Forks: | 0 |
| Total Open Issues: | 0 |
Message/Alerts Management for Laravel.
errors, information, warnings
in app/config/app.php
Add Service provider
add 'Valllabh\Message\MessageServiceProvider' in providers array
Add Facade
add 'Message' => 'Valllabh\Message\Facade\Message' in aliases array
Publishing config file
php artisan config:publish valllabh/message
Publishing views
php artisan view:publish valllabh/message
Add Message
$message // array, MessageBag
$group // any string name of group like 'sign_up_messages', 'website_notices'
$flash // true if message needs to be flashed on next request
Message::error( $message, $group = 'global', $flash = false );
Message::info( $message, $group = 'global', $flash = false );
Message::warning( $message, $group = 'global', $flash = false );
Message::success( $message, $group = 'global', $flash = false );
Message adding functions are nothing but the keys form the config:types
'types' => [
'success' => array( 'class' => 'alt-success' ),
'error' => array( 'class' => 'alt-danger' ),
'warning' => array( 'class' => 'alt-warning' ),
'info' => array( 'class' => 'alt-info' )
]