← Laravel learning pathLaravel · Module 4 of 10
Blade templates
Build views with Blade's clean syntax.
📖 Key ideas
- Views live in resources/views/*.blade.php.
- Print with {{ $name }} (escaped).
- Directives: @if, @foreach, @auth, @csrf.
- Layouts: @extends("layouts.app") with @section and @yield, or components <x-layout>.
- Components: php artisan make:component Alert.
💡 Real-life example: Blade is a stencil set: one layout traced many times with different words filled in.
BladeLaravel template engine
{{ }}Escaped output
@foreachLoop directive
ComponentReusable Blade view piece