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

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

mikehenken/laravel-db-blade-compiler
====================================

Render Blade templates from Eloquent Model Fields

v1.0.2(11y ago)139MITPHPPHP &gt;=5.3.0

Since Dec 28Pushed 11y agoCompare

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

READMEChangelogDependenciesVersions (4)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

[](#installation)

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

```
"mikeheknen/laravel-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

```

### 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.

### License

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 63.6% 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 ~99 days

Total

3

Last Release

4325d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/165f6872eba1a07a0c41273b6a650f2fc7252f63235722752431dde2504fd1d3?d=identicon)[mikehenken](/maintainers/mikehenken)

---

Top Contributors

[![Flynsarmy](https://avatars.githubusercontent.com/u/334808?v=4)](https://github.com/Flynsarmy "Flynsarmy (7 commits)")[![hamway](https://avatars.githubusercontent.com/u/390578?v=4)](https://github.com/hamway "hamway (2 commits)")[![mikehenken](https://avatars.githubusercontent.com/u/1530298?v=4)](https://github.com/mikehenken "mikehenken (2 commits)")

---

Tags

laravelmodeleloquentbladecompiler

### Embed Badge

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

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