Blade is Laravel's lightweight, powerful templating engine. Blade files use the .blade.php extension and are compiled to plain PHP and cached.
// Escaped output (safe — prevents XSS)
{{ $name }}
{{ $user->email }}
{{ now()->format('Y-m-d') }}
// Unescaped output (use only for trusted HTML)
{!! $htmlContent !!}
{{-- This comment is not rendered in the HTML output --}}
// From a controller
return view('profile', ['user' => $user]);
// Using compact()
return view('profile', compact('user', 'posts'));
// Using with()
return view('profile')->with('user', $user);
// Simple view with no data
Route::get('/about', fn () => view('about'));
// With data
Route::get('/welcome', fn () => view('welcome', ['name' => 'World']));