I would like to know the difference between Blade and Twig templates.
What are the advantages of using one over the other?
blade syntax is native to laravel, if you want to use Twig you need to setup packages for that(http://ilikekillnerds.com/2014/08/replacing-blade-with-twig-templating-in-laravel/).
you can find difference from this link https://laracasts.com/forum/?p=536-twig-over-blade/0
October CMS is build on top of laravel it uses Twig, and here is reasons why they use twig instead of Blade.
At a base level all templating languages are the same. Twig is a mature and robust templating language that is easy to learn. It also has Twig.js which can be used for client side rendering.
We could debate about the differences of Twig and Blade until the cows come home, at the end of the day, we went with Twig because it was a better candidate for October. It is important that a single templating language is used on the front-end, otherwise Themes and Plugins would not be compatible with each other.
refer https://octobercms.com/forum/post/why-twig
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With