PHPackages                             enflow/twig-blade-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. enflow/twig-blade-loader

ActiveLibrary[Templating &amp; Views](/categories/templating)

enflow/twig-blade-loader
========================

Load Blade into your Twig templates

3.2.0(1y ago)45.9k↓50%[1 PRs](https://github.com/enflow/twig-blade-loader/pulls)MITPHPPHP ^8.3CI failing

Since Nov 25Pushed 1y ago3 watchersCompare

[ Source](https://github.com/enflow/twig-blade-loader)[ Packagist](https://packagist.org/packages/enflow/twig-blade-loader)[ Fund](https://enflow.nl/contact)[ RSS](/packages/enflow-twig-blade-loader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (11)Used By (0)

Blade Loader for Twig
=====================

[](#blade-loader-for-twig)

[![Latest Version on Packagist](https://camo.githubusercontent.com/54bc1dc23391dfb75c5a2dc7fbb4f053cf268e46d152587ea9aa2a78348f5254/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e666c6f772f747769672d626c6164652d6c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/twig-blade-loader)[![GitHub Workflow Status](https://github.com/enflow/twig-blade-loader/workflows/run-tests/badge.svg)](https://github.com/enflow/twig-blade-loader/workflows/run-tests/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/53bb744c07feb400a3fb938698c36f9059eacb3d292bb8a15f6caf689b11d890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e666c6f772f747769672d626c6164652d6c6f616465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/twig-blade-loader)

The `enflow/twig-blade-loader` package provides the option to load Blade syntax into your Twig files. Mostly used for importing Blade Components from third-parties into your Twig-only application.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require enflow/twig-blade-loader
```

Usage
-----

[](#usage)

The Twig extension will automatically register when `rcrowe/twigbridge` is used. If you're using another configuration, you may wish to register the extension manually by loading the extension `Enflow\TwigBladeLoader\TwigBladeLoaderExtension`.

### Example

[](#example)

Take for instance, you have your Twig file, but you wish to include the  library from Spatie. This only includes Blade Component syntax: ``

You can use the `{% blade %}` syntax for this.

```
{% blade %}{% endblade %}
```

That's it! Your variables are automatically passed along from your global scope, and available to pass along.

Variables
---------

[](#variables)

You may choose to pass along extra variables to your Blade logic:

```
{% blade with {fieldName: 'avatar'} %}

{% endblade %}
```

Caveat
------

[](#caveat)

There is one big caveat though: Blade variables. As the syntax for rendering Blade variables is the same as Twig's, this conflicts. You may use the 'verbatim' class to work around this:

```
{% blade with {'name': 'name-in-verbatim'} %}
{% verbatim %}
{{ $name }}
{% endverbatim %}
{% endblade %}
```

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Michel Bardelmeijer](https://github.com/mbardelmeijer)
- [All Contributors](../../contributors)

About Enflow
------------

[](#about-enflow)

Enflow is a digital creative agency based in Alphen aan den Rijn, Netherlands. We specialize in developing web applications, mobile applications and websites. You can find more info [on our website](https://enflow.nl/en).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance43

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 51.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~258 days

Recently: every ~308 days

Total

7

Last Release

450d ago

Major Versions

1.1.0 → 2.0.02022-02-10

2.0.0 → 3.0.02023-02-25

PHP version history (5 changes)1.0.0PHP ^7.4

1.1.0PHP ^7.4|^8.0

2.0.0PHP ^8.1

3.0.0PHP ^8.2

3.2.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/665ee1919e7c3d12f556cb913d0012a632271f912dc9c3250b7da67d7f3f4b16?d=identicon)[enflow](/maintainers/enflow)

---

Top Contributors

[![mbardelmeijer](https://avatars.githubusercontent.com/u/1583095?v=4)](https://github.com/mbardelmeijer "mbardelmeijer (18 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![ronkesting](https://avatars.githubusercontent.com/u/12963798?v=4)](https://github.com/ronkesting "ronkesting (1 commits)")

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/enflow-twig-blade-loader/health.svg)

```
[![Health](https://phpackages.com/badges/enflow-twig-blade-loader/health.svg)](https://phpackages.com/packages/enflow-twig-blade-loader)
```

###  Alternatives

[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[moonshine/moonshine

Laravel administration panel

1.3k217.1k59](/packages/moonshine-moonshine)[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

703141.0k7](/packages/tallstackui-tallstackui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
