PHPackages                             aretusa/flash-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. aretusa/flash-bundle

ActiveSymfony-bundle[Parsing &amp; Serialization](/categories/parsing)

aretusa/flash-bundle
====================

This bundle extends the Symfony2 flash message system to handle messages for AJAX requests.

v1.0.2(11y ago)521.6k3MITJavaScriptPHP &gt;=5.3.3

Since Apr 22Pushed 10y ago1 watchersCompare

[ Source](https://github.com/michaelperrin/AretusaFlashBundle)[ Packagist](https://packagist.org/packages/aretusa/flash-bundle)[ Docs](https://github.com/michaelperrin/AretusaFlashBundle)[ RSS](/packages/aretusa-flash-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

AretusaFlashBundle
==================

[](#aretusaflashbundle)

A Symfony2 bundle to easily handle Ajax "flash messages" (those messages that show that everything went well when a form has been successfully submitted (success message), or conversely when the form was not valid (error message).

Symfony2 handles such Flash messages in the session out of the box so that they can be displayed after a redirection for instance.

With this bundle, if the request is an AJAX one (a form submitted in Javascript for instance), the flash messages will be automatically added to the JSON response and handled by a script file to be displayed to the user.

More information here:

Installation
============

[](#installation)

Add AretusaFlashBundle in your `composer.json` file:

```
{
    "require": {
        "aretusa/flash-bundle": "~1.0"
    }
}
```

Now tell Composer to download the bundle by running the command:

```
php composer.phar update aretusa/flash-bundle
```

Composer will install the bundle to your project's `vendor/aretusa` directory.

### Step 2: Enable the bundle

[](#step-2-enable-the-bundle)

Enable the bundle in the kernel:

```
