voilab / slim-extensions
Some Slim extensions made by Voilab.
1.1.3
2017-02-14 20:36 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-10-24 21:53:53 UTC
README
Simple extension for Twig and Slim.
Shamelessly based on Slim-Views by Josh Lockhart and Andrew Smith.
How to Install
using Composer
Create a composer.json file in your project root:
{
"require": {
"voilab/slim-extensions": "0.1.*"
}
}
Then run the following composer command:
$ php composer.phar install
Twig
$view->parserExtensions = array(
new \Voilab\Slim\Views\TwigExtension(),
);
rootUri
Inside your Twig template you would write:
{{ rootUri() }}
Authors
License
MIT Public License