You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The current "Blade Component Tag" format looks like this: <x-folder.component-name />
New format:
<component:folder.component-name />
Example:
Differences:
resources/views/
(for Anonymous Components)app/View/
(for Component Class)c:if="$posts->count()"
...Components in composer packages:
<component::package-name:folder.component-name />
Convert old to new format?
The old format and the new format works together without the need to change anything.
If you want migrate an old tag to the new format, you just have to add a leading "components."
<x-folder.component-name />
--><component:components.folder.component-name />
Final thoughts
I think, the new format looks much cleaner and is easier to understand.
Because the files are included from resources/views/ it's easier to organise your project files.
The new tag looks like the Livewire component tag
<livewire:folder.package-name :post="$post" />
Beta Was this translation helpful? Give feedback.
All reactions