domrafacz/slim-twig-flash-messages

A Twig extension to access Slim Flash messages in templates

1.0.1 2022-07-17 20:51 UTC

This package is auto-updated.

Last update: 2024-04-18 01:51:52 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