Open
Description
Hi,
I have a laravel app using twigbridge. Whenever a template is rendered for the first time, its view cache file contains its directory path instead of its name in getTemplateName()
method. All the sub templates rendered by that template (using include
) have correct names in their view cache files. This is causing problems with laravel view composer as it is not being triggered due to the wrong template names.
For example, the cache file has:
public function getTemplateName()
{
return "/var/www/app-name/resources/views/pages/profile/alternatives.twig";
}
instead of:
public function getTemplateName()
{
return "pages.profile.alternatives";
}
Is this expected behaviour? Is there a way to use template names instead of path in this case?
Thanks!
Metadata
Assignees
Labels
No labels
Activity