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

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

binjuhor/blade
==============

Laravel blade standalone for generate HTML CSS JS page

v1.0.7(1y ago)0153↓75%MITPHP

Since Feb 18Pushed 1y ago1 watchersCompare

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

READMEChangelog (5)Dependencies (3)Versions (9)Used By (0)

Blade template standalone
-------------------------

[](#blade-template-standalone)

This is a standalone blade template engine for PHP. It is a simple and easy to use template engine that is designed to be used in any PHP project.

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

[](#installation)

You can install this package via composer using this command:

```
composer require binjuhor/blade
```

Usage
-----

[](#usage)

```
use Binjuhor\Blade\BladeTemplate;

$template = new BladeTemplate([
    'views' => 'path/to/views/folder',
    'cache' => 'path/to/cache/folder',
    'compileDir' => 'path/to/compiled/folder',
    'url' => 'http://your-app-url.test'
]);

echo $template->render('view', ['data' => 'value']);
```

Read more about the blade template engine [here](https://laravel.com/docs/10.x/blade).

### To compile blade templates

[](#to-compile-blade-templates)

You can use the `compile` method to compile blade templates. For example, if you have a blade template called `home.blade.php` and you want to compile it, you can do so by calling the `compile` method.

```
$template->compile();
```

### Example

[](#example)

```
require_once "vendor/autoload.php";

use Binjuhor\Blade\BladeTemplate as Blade;

$compileDir = __DIR__ . '/compiles';
$viewDirectory = __DIR__ . '/resources/views';
$cacheDirectory = __DIR__ . '/cache';

$page = isset($_REQUEST['f']) ? $_REQUEST['f'] : 'index';

$blade = new Blade([
	'view' => $viewDirectory,
	'cache' => $cacheDirectory,
	'compileDir' => $compileDir,
	'url' => 'http://html-generator.test'
]);

echo $blade->render($page);
$blade->compiles();
```

### Sample project directory structure

[](#sample-project-directory-structure)

```
./index.php
./cache
./compiles
./resources
    /assets
        /css
        /js
        /images
    /views
        about.blade.php
        contact.blade.php
        home.blade.php
        404.blade.php
        /partials
            header.blade.php
            footer.blade.php
            sidebar.blade.php

```

Check out the [example](https://github.com/binjuhor/html-generator) directory for a complete example.

License
-------

[](#license)

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

Credits
-------

[](#credits)

- Blade template engine by Taylor Otwell
- This package is created by [Binjuhor](mailto:kiemhd@outlook.com)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~17 days

Recently: every ~30 days

Total

8

Last Release

701d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/556688af8b8c2da5c6e104c4f1c9c17227c4c21028f103c6b3523c302e0cd3b7?d=identicon)[binjuhor](/maintainers/binjuhor)

---

Top Contributors

[![binjuhor](https://avatars.githubusercontent.com/u/4584599?v=4)](https://github.com/binjuhor "binjuhor (12 commits)")

### Embed Badge

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

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[tightenco/jigsaw

Simple static sites with Laravel's Blade.

2.2k438.5k29](/packages/tightenco-jigsaw)[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[livewire/blaze

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

688221.3k17](/packages/livewire-blaze)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)

PHPackages © 2026

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