PHPackages                             leafs/blade - 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. leafs/blade

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

leafs/blade
===========

Leaf PHP Framework adaptation of jenssegers/blade package

v4.1.1(9mo ago)321.4k—0%4MITPHPPHP &gt;=7.4|^8.0

Since Aug 29Pushed 5mo agoCompare

[ Source](https://github.com/leafsphp/blade)[ Packagist](https://packagist.org/packages/leafs/blade)[ GitHub Sponsors](https://github.com/leafsphp)[ Fund](https://opencollective.com/leaf)[ RSS](/packages/leafs-blade/feed)WikiDiscussions v4.x Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (19)Used By (4)

 [![](https://camo.githubusercontent.com/00f1a28e2f7158ea6678c0c43add38c6f339d41a76f3eb1d9769057d80e7316d/68747470733a2f2f6c6561662d646f63732e6e65746c6966792e636f6d2f696d616765732f6c6f676f2e706e67)](https://camo.githubusercontent.com/00f1a28e2f7158ea6678c0c43add38c6f339d41a76f3eb1d9769057d80e7316d/68747470733a2f2f6c6561662d646f63732e6e65746c6966792e636f6d2f696d616765732f6c6f676f2e706e67)

Leaf Blade
==========

[](#leaf-blade)

[![Latest Stable Version](https://camo.githubusercontent.com/e65e01491fb281507cd7d99ca6907d1b945516cce8f7a3423c7119964802ae23/687474703a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a656e737365676572732f626c6164652e737667)](https://packagist.org/packages/leafs/blade) [![Build Status](https://camo.githubusercontent.com/98f6af29637767bbbf4f9fc9a922a7c6ce19e3c15b5897f63df6079d7ac705e0/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6a656e737365676572732f626c6164652e737667)](https://travis-ci.org/leafs/blade)

The standalone version of [Laravel's Blade templating engine](https://laravel.com/docs/5.8/blade) for use outside of Laravel.

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

[](#installation)

Install using composer:

```
composer require leafs/blade
```

Usage
-----

[](#usage)

Create a Blade instance by passing it the folder(s) where your view files are located, and a cache folder. Render a template by calling the `make` method. More information about the Blade templating engine can be found on .

```
use Leaf\Blade;

$blade = new Blade('app/views', 'app/views/cache');
```

You can also initialise it globally and point to template directories later.

```
$blade = new Blade;

// somewhere, maybe in a different file
$blade->configure("app/views", "app/views/cache");
```

```
echo $blade->make('index', ['name' => 'Michael Darko'])->render();
```

Alternatively you can use the shorthand method `render`:

```
echo $blade->render('index', ['name' => 'Michael Darko']);
```

We can have this as our template `index.blade.php`

```

        {{ $name }}

        {{ $name }}

```

You can also extend Blade using the `directive()` function:

```
$blade->directive('datetime', function ($expression) {
    return "";
});
```

Which allows you to use the following in your blade template:

```
Current date: @datetime($date)

```

The Blade instances passes all methods to the internal view factory. So methods such as `exists`, `file`, `share`, `composer` and `creator` are available as well. Check out the [original documentation](https://laravel.com/docs/5.8/views) for more information.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance64

Regular maintenance activity

Popularity30

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~233 days

Recently: every ~76 days

Total

17

Last Release

179d ago

Major Versions

v1.2.4 → v2.02023-11-27

v2.0.1 → v3.02024-08-17

v3.3 → v4.02025-02-23

PHP version history (3 changes)v1.2.0PHP &gt;=7.0

v2.0PHP &gt;=7.3|^8.0

v3.0PHP &gt;=7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29547806?v=4)[Mychi](/maintainers/Mychi)[@mychi](https://github.com/mychi)

---

Top Contributors

[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (34 commits)")[![mychidarko](https://avatars.githubusercontent.com/u/26604242?v=4)](https://github.com/mychidarko "mychidarko (23 commits)")[![daison12006013](https://avatars.githubusercontent.com/u/4581415?v=4)](https://github.com/daison12006013 "daison12006013 (12 commits)")[![ibnsultan](https://avatars.githubusercontent.com/u/28471267?v=4)](https://github.com/ibnsultan "ibnsultan (2 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![crosa7](https://avatars.githubusercontent.com/u/32076460?v=4)](https://github.com/crosa7 "crosa7 (1 commits)")[![lesichkovm](https://avatars.githubusercontent.com/u/7744963?v=4)](https://github.com/lesichkovm "lesichkovm (1 commits)")[![amoutonbrady](https://avatars.githubusercontent.com/u/17355226?v=4)](https://github.com/amoutonbrady "amoutonbrady (1 commits)")

---

Tags

bladeleafphpphptemplateslaravelbladetemplateviewrenderleafleafMVC

### Embed Badge

![Health badge](/badges/leafs-blade/health.svg)

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

###  Alternatives

[jenssegers/blade

The standalone version of Laravel's Blade templating engine for use outside of Laravel.

8661.2M109](/packages/jenssegers-blade)[fiskhandlarn/blade

A library for using Laravel Blade templates in WordPress/WordPlate.

365.8k](/packages/fiskhandlarn-blade)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

219.2k](/packages/leitsch-kirby-blade)[johnturingan/laravel-fly-view

Render Blade templates from string mark-up.

163.9k](/packages/johnturingan-laravel-fly-view)

PHPackages © 2026

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