# f3-flash
**Repository Path**: wfdaj/f3-flash
## Basic Information
- **Project Name**: f3-flash
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: GPL-3.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-02-21
- **Last Updated**: 2024-02-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Flash
This is a little plugin to add simple Flash Messages and Flash Keys for PHP Fat-Free-Framework, version 3.x
### Installation
- Method 1: use composer `composer require ikkez/f3-flash`
- Method 2: copy the `flash.php` file into your F3 `lib/` directory or another directory that is known to the [AUTOLOADER](https://fatfreeframework.com/quick-reference#AUTOLOAD)
### Usage
To add a message (or multiple) that should only be displayed once in your template on the next request, just do:
```php
\Flash::instance()->addMessage('You did that wrong.', 'danger');
// or
\Flash::instance()->addMessage('It worked!', 'success');
```
And to display that in your templates do:
```html
It's new !!!
{{ @FLASH->getKey('error') }}