# Blade

[Blade](https://laravel.com/docs/11.x/blade) is another renowned template engine that you can use in Advanced Views as a Twig alternative. You can read why we use it, and compare it with the Twig alternative [here](/advanced-views/templates/template-engines.md).

{% hint style="warning" %}
Important: Blade requires PHP 8.2.0 or later, while Twig requires PHP 7.4 (the same as WordPress). You should continue using Twig if you can't change the PHP version of your website for any reason.
{% endhint %}

## Usage

Using Blade over Twig is a good idea if you're a seasoned PHP developer, as Blade, unlike Twig, is closer to PHP and allows you to call any PHP (and WordPress) functions directly within the template.&#x20;

For example, you can call a [WordPress translate ('\_\_') function](https://developer.wordpress.org/reference/functions/__/) for any string like this:

```twig
{{ __("string", "domain") }}
```

Keep in mind that the output is escaped, so if you need to print a variable with HTML, you need to define a raw output by replacing the curly brackets with exclamation marks, like this:

```twig
{!! $my_var !!}
```

You can read more about Blade in the [official docs](https://laravel.com/docs/11.x/blade).

## Blade version

Currently Advanced Views Pro uses version 11.7.0 of the `illuminate/view` package.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wplake.gitbook.io/advanced-views/templates/template-engines/blade.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
