Closed killua-eu closed 5 years ago
I just added the twig-assets dependency. The configuration is like before:
https://github.com/odan/slim4-skeleton/blob/master/config/container.php#L94
The only difference is the new Slim 4 RouteParser.
https://github.com/odan/slim4-skeleton/blob/master/config/container.php#L114
// Add relative base url
$routeParser = $container->get(RouteParserInterface::class);
$twig->addGlobal('base_url', $routeParser->urlFor('root'));
Thanks lots.
Moving https://github.com/odan/twig-assets/issues/9 to this repo's issues. Quoting: