Friday, May 11, 2018

what is the equivalent of symfony’s components in laravel - development

what is the equivalent of symfony’s components in laravel

Back in the days when i was using symfony 1.x, we had a feature called Componenets. They were used when you wanted to include some kind of block in different parts of the site that required some controller code to render. Something like partials but more powerful because they could have some control logic behind it.
It made the code more cleaner and more powerful.

I’m wondering since laravel is a descendant of symfony, deos it have a similar concept? In other words, what is the best practice to do such things? I mean when you need a block of code(template) to be used in several places that needs some controller logic to prepare data for that template? Is it okay to just use helpers?

Thanks in advance.



from Laravel Questions and Answers https://laravelquestions.com/laravel/what-is-the-equivalent-of-symfonys-components-in-laravel/
via Lzo Media

No comments:

Post a Comment