Iam just wondering.
If The supported slim views (TWIG and SMARTY) have anY advantages over normal PHP views which Many of us are used to…
What extra advantages does one get from using slim views as opposed to normal views we are used to???:
Iam just wondering.
If The supported slim views (TWIG and SMARTY) have anY advantages over normal PHP views which Many of us are used to…
What extra advantages does one get from using slim views as opposed to normal views we are used to???:
The supported views are Twig & PHP…
If you’re confident that you won’t introduce XSS vulnerabilities then PHP view is fine.
The actual advantage depend on your requirements. There is a small learning curve, but worth the pay.
Slim Doc >> http://www.slimframework.com/docs/features/templates.html#the-slimtwig-view-component
You are not limited to the Twig-View and PHP-View components. You can use any PHP template system provided that you ultimately write the rendered template output to the PSR 7 Response object’s body.
I recommend use Twig directly (instead of using slimphp/Twig-View). You can have full access to all advanced features that twig provide. For example get full access to Different Loaders
To fully understand the advantages, spend some time practically on Twig.
TWIG
SMARTY
100% agreed with everything @Susanth.Com said. You really want to use a template engine these days …