domrafacz / slim-twig-flash-messages
A Twig extension to access Slim Flash messages in templates
1.0.1
2022-07-17 20:51 UTC
Requires
- php: >=7.4.0
- slim/flash: >=0.4.0
- slim/twig-view: >=2.0
- twig/twig: >=2.0
Requires (Dev)
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2025-02-18 03:37:08 UTC
README
This Twig extension lets you use Slim-Flash package functions inside Twig templates
Install
composer require domrafacz/slim-twig-flash-messages
Requirements
- PHP >= 7.4.0
- slim/flash >= 0.4.0
- Slim 3.x or Slim 4.x
- Twig 2.x or Twig 3.x
Usage
Below example should be adjusted to specific Slim framework installation
$twig->addExtension(new Slim\Twig\FlashMessages( $container['flash'] ));
Authors
- Dominik Rafacz
License
This project is licensed under the MIT License - see the LICENSE file for details