Getting started
Get voilaInitialization
Config DB
CRUD creation
Take exampleFlash message
create flashcustom flash
Twig
use twigdata transfert
CSRF
csrf protectionHTTPS
force httpsDocumentations
Create flash
To create a flash message, in your controller, you inherit the method "addFlash(string $color, string $message)". You can use the colors you want if they are managed by the css files.
By default, four colors are supported by Voila (voila-info, voila-success, voila-warning and voila-error).
You can test to create a flash message by copying and pasting the following message in the index method of your HomeController.
$this->addFlash("voila-success", "Hey, it's working");
You can enter several flash messages, they will be stored in session and displayed the next time the layout is launched, so on the next display of a page, and deleted as soon as they have been displayed.