gmlo89 / alert by gmlo89

Alerts for laravel 4
11
0
1
Package Data
Maintainer Username: gmlo89
Maintainer Contact: glopez@innsoft.mx (Giovanni Lopez)
Package Create Date: 2014-08-23
Package Last Update: 2014-08-23
Language: PHP
License: Unknown
Last Refreshed: 2024-11-25 15:06:02
Package Statistics
Total Downloads: 11
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Alert

Alert is a package for Laravel 4, provider a beatifull and simple way to display error messages.

For now this show the errors with structure for bootstrap, like this:

Bootstrap alerts

Based on this tutorial of @sileence

Version

0.1

Installation

Require innsoft/alert in composer.json and run composer update.

{
    "require": {
        "laravel/framework": "4.0.*",
        ...
        "innsoft/alert": "dev-master"
    }
    ...
}

Composer will download the package. After the package is downloaded, open app/config/app.php and add the service provider:

'providers' => array(
    ...
    'Innsoft\Alert\AlertServiceProvider',
),

Example

On app/routes.php

Route::get('/', function()
{
    Alert::message('Welcome to this app!', 'success');
    return View::make('hello');
});

On app/views/hello.blade.php add this:

{{ Alert::render() }}

**don't forget add bootstrap files to your project.

License

MIT

Author

Giovanni Lopez

@gmlo_89