ravenflux/env-in-twig

Twig extension that implements getenv in Twig template

1.0.0 2019-05-14 20:12 UTC

README

Latest Stable Version Latest Unstable Version License Total Downloads

ravenflux.jpg

Twig extension that implements getenv in Twig template.

Installation

The recommended way to install is via Composer:

composer require ravenflux/env-in-twig

For Symfony usage, import ravenflux/env-in-twig services.yaml file:

# config/services.yaml
imports:
    - { resource: '../vendor/ravenflux/env-in-twig/src/Resources/config/services.yaml' }

Usage

{{ getenv('APP_ENV') }}