PHPackages                             esdlabs/string-blade-compiler - 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. esdlabs/string-blade-compiler

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

esdlabs/string-blade-compiler
=============================

Render Blade templates from string

v2.0.0(11y ago)010.1kMITPHPPHP &gt;=5.3.0

Since Sep 19Pushed 11y ago3 watchersCompare

[ Source](https://github.com/esdlabs/StringBladeCompiler)[ Packagist](https://packagist.org/packages/esdlabs/string-blade-compiler)[ RSS](/packages/esdlabs-string-blade-compiler/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelogDependenciesVersions (6)Used By (0)

String Blade Compiler
=====================

[](#string-blade-compiler)

Render Blade templates from string value.

This is a fork from  which uses Elequent model to pass in a template.

I have reworked it to allow for a generic array of the required fields to generates and return a compiled view from a blade-syntax template.

Version
=======

[](#version)

This version 1 is for Laravel 4.2, version 2 is for Laravel 5.

Installation
============

[](#installation)

Add the repository to composer.json:

```
"repositories": [
{
    "name": "wpb/string-blade-compiler",
	"url": "https://github.com/TerrePorter/StringBladeCompiler.git",
	"type": "git"
}
],

```

Add the package to composer.json:

```
"require": {
	"laravel/framework": "4.2.*",
	"wpb/string-blade-compiler": "1.*@dev"
},

```

Add the ServiceProvider to the providers array in app/config/app.php

'Wpb\\StringBladeCompiler\\StringBladeCompilerServiceProvider',

There is no need to add a Facade to the aliases array in the same file as the service provider, this is being included automatically in the ServiceProvider.

Usage
=====

[](#usage)

This package offers a StringView facade with the same syntax as View but accepts a Array or Array Object instance instead of path to view.

```
return StringView::make(
                        array(
                            // this actual blade template
                            'template'  => '{{ $token1 }}',
                            // this is the cache file key, converted to md5
                            'cache_key' => 'my_unique_cache_key',
                            // timestamp for when the template was last updated, 0 is always recompile
                            'updated_at' => 1391973007
                        ),
                        array(
                            'token1'=> 'token 1 value'
                        )
                );
```

Also allows for Blade::extend, example :

```
                        // allows for @continue and @break in foreach in blade templates
                        Blade::extend(function($value)
                        {
                          return preg_replace('/(\s*)@(break|continue)(\s*)/', '$1$3', $value);
                        });
```

License
=======

[](#license)

string-blade-compiler is open-sourced software licensed under the MIT license

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% 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 ~2 days

Total

5

Last Release

4122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98c9727660bb47f792821768e09e09f7d8ab860a92cf371c47d49243dcddf094?d=identicon)[edgarnadal](/maintainers/edgarnadal)

---

Top Contributors

[![TerrePorter](https://avatars.githubusercontent.com/u/4440749?v=4)](https://github.com/TerrePorter "TerrePorter (15 commits)")[![rrrhys](https://avatars.githubusercontent.com/u/361922?v=4)](https://github.com/rrrhys "rrrhys (2 commits)")

---

Tags

laravelbladecompiler

### Embed Badge

![Health badge](/badges/esdlabs-string-blade-compiler/health.svg)

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

###  Alternatives

[wpb/string-blade-compiler

Laravel Blade String Compiler, render string as blade templates

1741.1M3](/packages/wpb-string-blade-compiler)[radic/blade-extensions

Laravel package providing additional Blade extensions: foreach (with $loop data like twig), break, continue, set,array (multiline), etc

271321.7k5](/packages/radic-blade-extensions)

PHPackages © 2026

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