Support the ongoing development of Laravel.io →
Views Blade
Last updated 1 year ago.
0

I guess you want to keep your code DRY (Don't Repeat Yourself) - so the question is how much similarity will there be between the 3 user page templates?

If there is a lot of repetition (eg. adding style sheets/javascript/templating) then it makes sense to have a common master template and then extend this for each individual user.

If each user page is going to be completely different then why not have three.

In any case you will probably have a standard html template which all of your views extend (I call mine html.blade.php).

0

Actually the layout for all 3 pages are completely different. Bcz one is going to be the public view. One is the logged in view and the other is admin view.

So, having a page with all css,js and images as a master page and extending that to 3 layout pages and then those 3 layout pages will have the concrete child pages like "home" "about us".

Will the above approach improve performance when compared to creating 3 different master pages and then the child pages (eliminating the master page which has no actual functionality except importing css,js and the title tag) ?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

PraveenSan praveensan Joined 12 Jan 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.