PHPackages                             macromindonline/db-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. macromindonline/db-blade-compiler

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

macromindonline/db-blade-compiler
=================================

Render Blade templates from Eloquent Model Fields

5.4.2(8y ago)017MITPHPPHP &gt;=5.3.0

Since Dec 28Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (12)Used By (0)

DB Blade Compiler
-----------------

[](#db-blade-compiler)

### Render Blade templates from Eloquent Model Fields

[](#render-blade-templates-from-eloquent-model-fields)

This package generates and returns a compiled view from a blade-syntax field in your Eloquent model.

### Installation (Laravel v &lt; 5)

[](#installation-laravel-v--5)

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

```
"flynsarmy/db-blade-compiler": "1.*"

```

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

```
'Flynsarmy\DbBladeCompiler\DbBladeCompilerServiceProvider',

```

and the Facade to the aliases array in the same file

```
'DbView'          => 'Flynsarmy\DbBladeCompiler\Facades\DbView',

```

You can also optionally publish the config-file

```
php artisan config:publish flynsarmy/db-blade-compiler

```

### Installation (Laravel 5.x)

[](#installation-laravel-5x)

Require this package in your composer.json and run composer update (or run `composer require flynsarmy/db-blade-compiler:2.*` directly):

```
"flynsarmy/db-blade-compiler": "*"

```

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

```
'Flynsarmy\DbBladeCompiler\DbBladeCompilerServiceProvider',

```

and the Facade to the aliases array in the same file

```
'DbView'          => 'Flynsarmy\DbBladeCompiler\Facades\DbView',

```

You have to also publish the config-file

```
php artisan vendor:publish

```

### Usage

[](#usage)

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

```
$template = Template::first();
return DbView::make($template)->with(['foo' => 'Bar'])->render();

```

Because you're passing a model to `DbView::make()`, db-blade-compiler needs to know which field to compile. By default this is `content` however you can set the field used with either of the following methods:

```
return DbView::make($template, ['foo' => 'Bar'], [], 'excerpt')->render();
return DbView::make($template)->field('excerpt')->with(['foo' => 'Bar'])->render();

```

You may set the default column used in the package config. You can enable using cache in compiling view from a blade-syntax field in your Eloquent model operation by enabling cache config in package config. By default this option is disabled.

### License

[](#license)

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

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~203 days

Total

10

Last Release

3165d ago

Major Versions

v1.0.2 → v2.0.02015-06-07

v2.0.2 → v3.0.02016-03-28

v3.0.0 → 5.4.02017-02-13

### Community

Maintainers

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

---

Top Contributors

[![Flynsarmy](https://avatars.githubusercontent.com/u/334808?v=4)](https://github.com/Flynsarmy "Flynsarmy (20 commits)")[![dducro](https://avatars.githubusercontent.com/u/2156884?v=4)](https://github.com/dducro "dducro (15 commits)")[![cariboufute](https://avatars.githubusercontent.com/u/2434235?v=4)](https://github.com/cariboufute "cariboufute (4 commits)")[![jp-davy](https://avatars.githubusercontent.com/u/26009555?v=4)](https://github.com/jp-davy "jp-davy (4 commits)")[![ebrahimradi](https://avatars.githubusercontent.com/u/5802975?v=4)](https://github.com/ebrahimradi "ebrahimradi (3 commits)")[![rozklad](https://avatars.githubusercontent.com/u/3017167?v=4)](https://github.com/rozklad "rozklad (2 commits)")[![hamway](https://avatars.githubusercontent.com/u/390578?v=4)](https://github.com/hamway "hamway (2 commits)")[![AlexECP](https://avatars.githubusercontent.com/u/4592827?v=4)](https://github.com/AlexECP "AlexECP (2 commits)")[![patrickhoogkamer](https://avatars.githubusercontent.com/u/1894838?v=4)](https://github.com/patrickhoogkamer "patrickhoogkamer (1 commits)")

---

Tags

laravelmodeleloquentbladecompiler

### Embed Badge

![Health badge](/badges/macromindonline-db-blade-compiler/health.svg)

```
[![Health](https://phpackages.com/badges/macromindonline-db-blade-compiler/health.svg)](https://phpackages.com/packages/macromindonline-db-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)
