pmn834 / flashmessage
Flashmessage for Anax MVC
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/pmn834/flashmessage
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2026-01-07 15:18:40 UTC
README
Flashmessage for Anax MVC
Available at Packagist as flashmessage.
Using CFlashmessage
Copy the file flashmessage.css from the CFlashmessage/css folder to your Anax webroot/css folder. This stylesheet can then be added to your frontcontroller.
$app->theme->addStylesheet("css/flashmessage.css");
Add CFlashmessage as a service.
$di->setShared('flash', function() { $flashmessage = new \pmn834\CFlashmessage\CFlashmessage(); return $flashmessage; });
Start a session before using CFlashmessage.
$app->session();
One or more flashmessages can then be added.
$app->flash->info("Info flash message"); $app->flash->error("Error flash message"); $app->flash->success("Success flash message"); $app->flash->warning("Warning flash message");
To get all flashmessages as HTML use flash->output().
$app->flash->output();
The CFlashmessage/webroot folder includes the frontcontroller flashtest.php to test the CFlashmessage service.