PHPackages                             buchin/slim-blade-view - 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. [Framework](/categories/framework)
4. /
5. buchin/slim-blade-view

ActiveLibrary[Framework](/categories/framework)

buchin/slim-blade-view
======================

Blade for Slim Framework 3 with Custom Directive

0.1.1(10y ago)219.7k1MITPHP

Since Mar 10Pushed 9y ago1 watchersCompare

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

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

Blade for Slim Framework 3
==========================

[](#blade-for-slim-framework-3)

Usage
-----

[](#usage)

In index.php set up the blade container:

```
$container = $app->getContainer();
$blade = new \Slim\Views\Blade(
    '/path/to/views/folder',
    '/path/to/cache/folder'
);

// [optional] insert custom directive here

$container['blade'] = $blade;
```

Example code to render index.blade.php in route:

```
return $this->blade->render($response, 'index', $args);
```

### Advanced: Custom directive:

[](#advanced-custom-directive)

```
$container = $app->getContainer();
$blade = new \Slim\Views\Blade(
    '/path/to/views/folder',
    '/path/to/cache/folder'
);

// example directive here, usage: @helloWorld
$blade->getRenderer()->getCompiler()->directive('helloWorld', function(){

    return "";
});

$container['blade'] = $blade;

$app->run();
```

If you like to build custom directive using $app:

```
$app->getContainer()['blade']->getRenderer()->getCompiler()->directive('helloWorld', function(){

    return "";
});
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.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 ~0 days

Total

2

Last Release

3721d ago

### Community

Maintainers

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

---

Top Contributors

[![hiropeke](https://avatars.githubusercontent.com/u/16171793?v=4)](https://github.com/hiropeke "hiropeke (5 commits)")[![buchin](https://avatars.githubusercontent.com/u/156540?v=4)](https://github.com/buchin "buchin (2 commits)")

---

Tags

frameworkslimbladetemplateviewrenderer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/buchin-slim-blade-view/health.svg)

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

###  Alternatives

[slim/php-view

Render PHP view scripts into a PSR-7 Response object.

2739.7M95](/packages/slim-php-view)[rubellum/slim-blade-view

Slim Framework 3 view helper built on the Blade component

1822.4k2](/packages/rubellum-slim-blade-view)[slim/twig-view

Slim Framework 4 view helper built on top of the Twig 3 templating component

3708.0M210](/packages/slim-twig-view)[mathmarques/smarty-view

Slim Framework 4 view helper built on top of the Smarty templating component

24134.7k1](/packages/mathmarques-smarty-view)[projek-xyz/slim-plates

Render your Slim 3 application views using Plates template engine.

2678.2k3](/packages/projek-xyz-slim-plates)

PHPackages © 2026

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