Twig integration in CI4 |
There are several ways to do this.
In my case, I followed Twig's own documentation. In the baseController I made the following changes: PHP Code: <?php In the methods I use to display the views, I simply replace the 'echo view() with '$this->twig->render()' PHP Code: ... You can create a helper or a function if you prefer and even replace the original view () function. You can see more examples in the documentation https://twig.symfony.com/ This is what is amazing about this Framework, it offers you several resources, but it does not prevent you from adding other resources. Congratulations on the incredible work of the team. |
Welcome Guest, Not a member yet? Register Sign In |