Blade

Laravel’s template language: HTML with `{{ }}` for escaped output and `@if`, `@foreach` directives.

PHP

Example

@foreach ($services as $s)
  <h3>{{ $s['title'] }}</h3>
@endforeach

{{ }} escapes HTML; {!! !!} doesn't, so use it only for trusted output.

Gotcha

An @word in a PHP string inside a template can be read as a directive: '@context' in JSON-LD broke on alp-see.com. Write '@'.'context' or @@context.

Related

← Artisan Updated 2026-11-26 Composer →