Blade Templating
Blade is Laravel's templating engine. Files use the .blade.php extension.
<html>
<head>
<title>@yield("title")</title>
</head>
<body>
@yield("content")
</body>
</html>
@extends("layouts.app")
@section("title", "Home Page")
@section("content")
<h1>Welcome</h1>
<p>{{ $message }}</p>
@endsectionBlade Syntax
{{ $name }} // Escaped output
{!! $html !!} // Unescaped output (use sparingly)
@{{ $vueVariable }} // JavaScript framework binding
@if (count($items) > 0)
<p>Items found: {{ count($items) }}</p>
@else
<p>No items.</p>
@endif
@foreach ($users as $user)
<p>{{ $user->name }}</p>
@endforeachConfiguration
// config/app.php
return [
"name" => env("APP_NAME", "Laravel"),
"env" => env("APP_ENV", "production"),
"debug" => (bool) env("APP_DEBUG", false),
"url" => env("APP_URL", "http://localhost"),
];
// Access config
$appName = config("app.name");
$timezone = config("app.timezone");Laravel 13: Config Improvements
Laravel 13 introduces config:show for inspecting config values from the CLI. Environment files support .env.encrypted out of the box.