I have difficulties getting my head around laravels blade layouts.
All the examples and documentations around the internet (e.g. laravel documentation: https://laravel.com/docs/5.3/blade or video tutorials on youtube) only use one master.blade.php as layout.
Is there a best practice for more complex projects?
The following content types are included in my project:
- product
- category
- blog
- taxonomy
- home
- administrative
- login/auth
All of these content types have different layouts:
- different/no sidebar
- sidebar on left/right
- different header
- no/banner before content
- different/no menu
- different/no breadcrumb
So I don't know in what situation ...
- create a new layout file (e.g. /views/layouts/product.blade.php) and extend it in my page (in /views/pages/product.blade.php with @extends("layouts.product") )
... or ...
- use only one layout file that contains all different types and implement them as sections in the page file of each type.
This one drives me crazy right now and I couldn't find anything valuable like a best practice wether to use layouts or not.
Thank you so much for your help!
includefor your sidebar and other parts - Hammerbot