Blade components live in resources/views/components and can be class-based or anonymous. They accept data via attributes, e.g. <x-alert type="error">, and support slots for injecting child content. Layouts built with @extends/@yield or component-based layouts (<x-layout>) keep views DRY.
← Laravel theorytheory 0/50 · 0%
Blade · easy
9. Blade Components & Layouts
Reusable view pieces.
Check your understanding
1. How do you render a Blade component named 'alert'?
2. What Blade directive defines a section a child can override?