Laravel Blade Layout Components in Subfolders: Breeze Example

preview_player
Показать описание
A quick refactoring of Laravel Breeze structure in a way how I would personally prefer.

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

Always been used to working with blade directives, use extend for layouts. But would consider trying this approach.

itsnicolaz
Автор

I like the way it was... I like having a dedicated layouts folder that is separate from my components

DanteMishima
Автор

Very interesting take. Never noticed it was optional haha

dredev
Автор

It's opinionated as you said. I was wondering about how jetstream organize its livewire and blade components too. Basically it has blade pages but some part are livewire. It's like they design MVC first then added livewire later. Plus they do not use the standard livewire folder, the mix the livewire with blade in a feature folder. Maybe a good topic to discuss. Thanks for sharing your opinion on it.

BrunoBernard-knvt
Автор

I had never noticed this but it is true that it is a little illogical but also optional

jean-marcstrauven
Автор

I still prefer to use standard view layouts and view components for components/repeated elements

rafamorawiec
Автор

Using x-layout and @extends which one is better

ifeanyinnaemego
Автор

Nice to know thanks 😊
I want to ask for help related to blade views. I have complex form with multiple data inputs, and saving old data in input fields if validation fails requires to modify all these inputs which is annoying, especially that I have dynamic add tabs and new items in the form. Do you have any suggestion? I use blade views with javascript

tasneemwahdan
Автор

Tbh I like components when it's repeated, but otherwise it gets annoying lol

JamesAutoDude