PHPackages                             jwz104/eloquent-view - 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. jwz104/eloquent-view

AbandonedArchivedLibrary

jwz104/eloquent-view
====================

Create sql views with eloquent

1.0.0(8y ago)248MITPHPPHP &gt;=5.6.0

Since Sep 17Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jwz104/eloquent-view)[ Packagist](https://packagist.org/packages/jwz104/eloquent-view)[ RSS](/packages/jwz104-eloquent-view/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Eloquent view
=============

[](#eloquent-view)

With Eloquent view you can create a SQL view with the eloquent query builder. This will prevent huge SQL strings in your migrations.

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

[](#installation)

Run `composer require jwz104/eloquent-view`.

Add the service provider to `config/app.php`:

```
'providers' => [
    Jwz104\EloquentView\EloquentViewServiceProvider::class,
]

```

Optionally add the facade:

```
'aliases' => [
    'EloquentView' => Jwz104\EloquentView\Facades\EloquentView::class,
]

```

How to use
----------

[](#how-to-use)

Eloquent view is really easy to use.
Just parse a builder instance to the create method of the view builder.

Example migration:

```
class CreateEmployeesView extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        $builder = DB::table('employees')
            ->join('companies', 'employees.company_id', '=', 'companies.id')
            ->select('employees.*', 'companies.name');

        EloquentView::create('employees_view', $builder);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        EloquentView::dropIfExists('employees_view');
    }
}

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f4817269b8a2ad0642acc7e7701ed476184dd5fe180ca7dc27acc7dff41e0d4?d=identicon)[jwz104](/maintainers/jwz104)

---

Top Contributors

[![janwytze](https://avatars.githubusercontent.com/u/6162114?v=4)](https://github.com/janwytze "janwytze (2 commits)")

### Embed Badge

![Health badge](/badges/jwz104-eloquent-view/health.svg)

```
[![Health](https://phpackages.com/badges/jwz104-eloquent-view/health.svg)](https://phpackages.com/packages/jwz104-eloquent-view)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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