PHPackages                             digivo/laravel-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. [Database &amp; ORM](/categories/database)
4. /
5. digivo/laravel-string-blade-compiler

ActiveLibrary[Database &amp; ORM](/categories/database)

digivo/laravel-string-blade-compiler
====================================

Render Blade templates from a string

1.3.1(6y ago)415.0k8[1 PRs](https://github.com/digivo/laravel-string-blade-compiler/pulls)MITPHPPHP &gt;=5.3.0

Since May 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/digivo/laravel-string-blade-compiler)[ Packagist](https://packagist.org/packages/digivo/laravel-string-blade-compiler)[ RSS](/packages/digivo-laravel-string-blade-compiler/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (7)Used By (0)

String Blade Compiler
---------------------

[](#string-blade-compiler)

Originally forked from [Flynsarmy/laravel-db-blade-compiler](https://github.com/Flynsarmy/laravel-db-blade-compiler)

### Render Blade templates from a string

[](#render-blade-templates-from-a-string)

This package generates and returns a compiled view from a provided string

### Installation (Laravel 5.x)

[](#installation-laravel-5x)

Require this package in your composer.json and run composer update (or run `composer require digivo/laravel-string-blade-compiler:1.*` directly):

```
"digivo/laravel-string-blade-compiler": "1.*"

```

After updating composer, add the ServiceProvider to the providers array in app/config/app.php

```
'Digivo\StringBladeCompiler\StringBladeCompilerServiceProvider',

```

and the Facade to the aliases array in the same file

```
'StringView'          => 'Digivo\StringBladeCompiler\Facades\DigivoView',

```

You have to also publish the config-file

```
php artisan vendor:publish

```

### Usage

[](#usage)

This package offers a `StringView` facade with the same syntax as `View` but accepts a string instead of path to view.

```
return StringView::make('@if ($foo == "Bar") foo is Bar @else foo is not Bar @endif')->with(['foo' => 'Bar'])->render();

```

### License

[](#license)

laravel-string-blade-compiler is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~306 days

Total

5

Last Release

2427d ago

### Community

Maintainers

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

---

Top Contributors

[![digivo](https://avatars.githubusercontent.com/u/13644788?v=4)](https://github.com/digivo "digivo (10 commits)")[![victorboissiere](https://avatars.githubusercontent.com/u/4125799?v=4)](https://github.com/victorboissiere "victorboissiere (1 commits)")

---

Tags

laravelmodeleloquentbladecompiler

### Embed Badge

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

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

###  Alternatives

[flynsarmy/db-blade-compiler

Render Blade templates from Eloquent Model Fields

170866.2k2](/packages/flynsarmy-db-blade-compiler)[shiftonelabs/laravel-cascade-deletes

Adds application level cascading deletes to Eloquent Models.

163632.1k2](/packages/shiftonelabs-laravel-cascade-deletes)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[phaza/single-table-inheritance

Single Table Inheritance Trait

1515.8k](/packages/phaza-single-table-inheritance)

PHPackages © 2026

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