drewroberts / blog

📝 Laravel package for my opinionated style of adding blog posts to Laravel projects
MIT License
2 stars 4 forks source link

View Layouts for Frontend Pages #60 #61

Closed drewroberts closed 3 years ago

pdbreen commented 3 years ago

Is there more documentation somewhere on the big picture? There's not enough in issue #60 to fully understand what you are trying to achieve or how all of this would work in Laravel.

drewroberts commented 3 years ago

@pdbreen Could you add a type on Layout with Enum so that each model can have its own Layout designs? We'll need the following in here:

Could other packages then add new Types to that list for the models in their packages that need layouts?

I'll create stub Layouts for each of those models in the views directory and will also add them in data migration in the regular migrations folder.

pdbreen commented 3 years ago

Added LayoutManager singleton (and facade) along with a LayoutViewCreator that allow establishing a layout context for the view and making sure context is injected in every view. Will add testing after some different layouts are added.

drewroberts commented 3 years ago

@pdbreen THANK YOU! I kept tripping over myself with this code.