I would like to define a global variable for twig, which would be accessible from any template.
I can create a global variable in symfony's config/packages/twig.yaml, but I need it to be a value obtained from the database.
In the documentation for twig it says to use this code:
$twig = new Twig_Environment($loader);
$twig->addGlobal('name', 'value');
Where should I use this code so this varible is available for every template?