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

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

lexdubyna/blade
===============

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

v1.5.0(3y ago)318711MITPHPPHP &gt;=7.0

Since Dec 8Pushed 3y agoCompare

[ Source](https://github.com/lexdubyna/blade)[ Packagist](https://packagist.org/packages/lexdubyna/blade)[ RSS](/packages/lexdubyna-blade/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (1)

Blade
=====

[](#blade)

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

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

[](#installation)

Install using composer:

```
composer require lexdubyna/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 Lexdubyna\Blade\Blade;

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

echo $blade->make('homepage', ['name' => 'John Doe'])->render();
```

Alternatively you can use the shorthand method `render`:

```
echo $blade->render('homepage', ['name' => 'John Doe']);
```

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/8.x/views) for more information.

Components
----------

[](#components)

You can make use of [view components](https://laravel.com/docs/8.x/blade#components) with this package.

To be able to use class-based and anonymous components, you need to register them:

```
$blade->compiler()->components([
    'alert'                     => App\View\Components\Alert::class, //
    'components.anonymous.link' => 'link'                            //
])
```

### Class-based Components

[](#class-based-components)

Your class component has to extend `Jenssegers\Blade\ViewComponent` and have a protected property `$template`:

```
namespace App\View\Components;

use Lexdubyna\Blade\ViewComponent;

class Alert extends ViewComponent
{
    // all the public properties will be exposed inside the template
    public string $type;
    public string $message;

    protected string $template = 'components.alert'; // $template is required, it's a path to a blade template file

    public function __construct($type, $message)
    {
        $this->type = $type;
        $this->message = $message;
    }
}
```

TODO:
-----

[](#todo)

- tests for components
- make compatible with `illuminate/view^9.0`

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.5% 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

Unknown

Total

1

Last Release

1257d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dfbbe0ba2a284a42e8c2644d4879d8e764fb98fc3c02579b4b16c5ce59034014?d=identicon)[lexdubyna](/maintainers/lexdubyna)

---

Top Contributors

[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (38 commits)")[![daison12006013](https://avatars.githubusercontent.com/u/4581415?v=4)](https://github.com/daison12006013 "daison12006013 (12 commits)")[![lexdubyna](https://avatars.githubusercontent.com/u/28711253?v=4)](https://github.com/lexdubyna "lexdubyna (2 commits)")[![lesichkovm](https://avatars.githubusercontent.com/u/7744963?v=4)](https://github.com/lesichkovm "lesichkovm (1 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")[![amoutonbrady](https://avatars.githubusercontent.com/u/17355226?v=4)](https://github.com/amoutonbrady "amoutonbrady (1 commits)")[![TullariS](https://avatars.githubusercontent.com/u/7660175?v=4)](https://github.com/TullariS "TullariS (1 commits)")[![edgarsn](https://avatars.githubusercontent.com/u/6625918?v=4)](https://github.com/edgarsn "edgarsn (1 commits)")[![IonBazan](https://avatars.githubusercontent.com/u/1985514?v=4)](https://github.com/IonBazan "IonBazan (1 commits)")

---

Tags

laravelbladetemplateviewrender

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[jenssegers/blade

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

8661.2M109](/packages/jenssegers-blade)[spatie/laravel-blade-comments

Add debug comments to your rendered output

177325.5k](/packages/spatie-laravel-blade-comments)[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)
