How to render a view?
ArneAnka opened this issue · 2 comments
ArneAnka commented
Hi!
Is their a way to render a view?
mrjgreen commented
You can certainly use this package with a templating engine like Twig, but the router itself doesn't handle view rendering.
Here is an example application using Phroute and Twig: https://github.com/mrjgreen/skeleton-app
The view rendering is done here: https://github.com/mrjgreen/skeleton-app/blob/simple/app/src/Application/Controller/HomeController.php#L7
Hope that helps!
ArneAnka commented
Thanks!
Actually I'm trying to set up phroute with Twig, and your skeleton-app seems to be nice!
But I'm trying to just use phroute and twig. But having problem to get phroute work in a subdir.