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

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

caiquebispo/blade-slim
======================

Pacote para usar Blade (Laravel) no Slim Framework

1.0.2(1y ago)3141MITPHPPHP ^8.4

Since Apr 19Pushed 1y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (4)Used By (1)

BladeSlim
=========

[](#bladeslim)

Integration of Blade Template Engine with Slim Framework

[![Latest Stable Version](https://camo.githubusercontent.com/827c2143bc2cfe673be7dd096b652fecc8756239857ef7aedb8e30faf060f946/687474703a2f2f706f7365722e707567782e6f72672f636169717565626973706f2f626c6164652d736c696d2f76)](https://packagist.org/packages/caiquebispo/blade-slim) [![Total Downloads](https://camo.githubusercontent.com/2873deebc95991b0831ce32a89b303144877213af9ae8dcf954b08338c86638e/687474703a2f2f706f7365722e707567782e6f72672f636169717565626973706f2f626c6164652d736c696d2f646f776e6c6f616473)](https://packagist.org/packages/caiquebispo/blade-slim) [![Latest Unstable Version](https://camo.githubusercontent.com/229626424662952d03ae10ec6dc666270b0ef870e91f2c656ee216793fdc2f2b/687474703a2f2f706f7365722e707567782e6f72672f636169717565626973706f2f626c6164652d736c696d2f762f756e737461626c65)](https://packagist.org/packages/caiquebispo/blade-slim) [![License](https://camo.githubusercontent.com/3b033eb96a1c598e31a0853b17bee06fb188cefb47bd2c63e8e92d037b6340d6/687474703a2f2f706f7365722e707567782e6f72672f636169717565626973706f2f626c6164652d736c696d2f6c6963656e7365)](https://packagist.org/packages/caiquebispo/blade-slim) [![PHP Version Require](https://camo.githubusercontent.com/c46a48eb21aff522e2cef01ce7c5cee28611bde43de0859d919b3b9604a6df88/687474703a2f2f706f7365722e707567782e6f72672f636169717565626973706f2f626c6164652d736c696d2f726571756972652f706870)](https://packagist.org/packages/caiquebispo/blade-slim)

A package that seamlessly integrates Laravel’s Blade templating engine with the Slim Framework, providing a smooth development experience with full Blade features in Slim applications.

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

[](#installation)

Install via Composer:

```
composer require caiquebispo/blade-slim
```

Quick Setup
-----------

[](#quick-setup)

Configure Blade in your Slim application:

```
use BladeSlim\Blade;
use Slim\Factory\AppFactory;

$app = AppFactory::create();

// Blade Configuration
$blade = new Blade(
    __DIR__ . '/../resources/views', // Views directory
    __DIR__ . '/../storage/cache',   // Cache directory
    $app->getResponseFactory()->createResponse() // Response prototype
);
```

Create your first view in `resources/views/home.blade.php` and make sure the `storage/cache` folder is writable:

```

    {{ $title }}

    Welcome to {{ $appName }}!

```

Use it in a route:

```
$app->get('/', function () {
    return view('home', [
        'title' => 'Home Page',
        'appName' => 'My Slim App'
    ]);
});
```

Key Features
------------

[](#key-features)

### Global `view()` Function

[](#global-view-function)

Automatically returns a ready PSR-7 response.

Supports data, status codes, and headers:

```
return view('error', ['message' => 'Not Found'], 404);
```

### Full Blade Support

[](#full-blade-support)

- Template inheritance (`@extends`)
- Sections (`@section`, `@yield`)
- Components (`@component`)
- Custom directives
- Sub-view inclusion (`@include`)

### Flexible Configuration

[](#flexible-configuration)

- Multiple view paths
- Optional caching
- Integration with Slim's DI container

Advanced Usage
--------------

[](#advanced-usage)

### Custom Directives

[](#custom-directives)

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

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

[](#contributing)

Contributions are welcome! Follow these steps:

1. Fork the project
2. Create your branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

📄 License
---------

[](#-license)

Distributed under the MIT License. See `LICENSE` for more information.

📧 Contact
---------

[](#-contact)

Caique Bispo -

Project Link:

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance48

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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

Total

3

Last Release

388d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/963372c11b8438fac9cf58a2c4f75526b91f2918b09d470bc4e25d789db31c74?d=identicon)[caiquebispo](/maintainers/caiquebispo)

---

Top Contributors

[![caiquebispo](https://avatars.githubusercontent.com/u/62433514?v=4)](https://github.com/caiquebispo "caiquebispo (3 commits)")

### Embed Badge

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

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

###  Alternatives

[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)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[laravellux/html

HTML and Form Builders for the Laravel Framework

35239.2k3](/packages/laravellux-html)

PHPackages © 2026

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