Why not just always use embed?
According to the docs the embed tag combines the behavior of the include and extend tags.
I understand that in a lot of cases you don't need to do extend and only want to render the contents of another template, but it seems to me like you could just always use embed and serve that purpose. Are there any performance ramifications of embed to be aware of? Any functionality differences I'm missing?
I would summarize the differences and similarities between Embed and Include as follow,
Based on the differences, Include should be used only when you need to split a template into many functional sub-templates and reuse the wrapped code elsewhere.
While Embed is used when you need to customise the reusable templates.
So, it's more a matter of design than anything else (performance, code execution, ...)
Choose the helper that fit your needs.
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