PHPackages                             sfneal/builders - 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. sfneal/builders

Abandoned → [sfneal/models](/?search=sfneal%2Fmodels)ArchivedLibrary[Database &amp; ORM](/categories/database)

sfneal/builders
===============

Eloquent\\Builder wrapper with extended functionality

1.0.2(5y ago)06.9kMITPHPPHP &gt;=7.3

Since Aug 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sfneal/builders)[ Packagist](https://packagist.org/packages/sfneal/builders)[ Docs](https://github.com/sfneal/builders)[ RSS](/packages/sfneal-builders/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (10)Dependencies (5)Versions (16)Used By (0)

Query Builders
==============

[](#query-builders)

[![Packagist PHP support](https://camo.githubusercontent.com/40c353a4aad36746eced7272d0b620427a959783859973af5c7d6f51355f57d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f73666e65616c2f6275696c64657273)](https://packagist.org/packages/sfneal/builders)[![Latest Version on Packagist](https://camo.githubusercontent.com/5684ccd1f7d9012bccd430baad9f776493a317baffd4dbe1b9a1c2d604adbd89/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73666e65616c2f6275696c646572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfneal/builders)[![Build Status](https://camo.githubusercontent.com/59ef64247fed68c6f49e12486938d5b72cfb9af14fd7e5f4b291138b08414314/68747470733a2f2f7472617669732d63692e636f6d2f73666e65616c2f6275696c646572732e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.com/sfneal/builders)[![StyleCI](https://camo.githubusercontent.com/40bf9fbf749074cf65f099149b6d3b85a86b1b7315b4eaaae50134a37722dab0/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3238373337393533302f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/287379530?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a865ba8407884879027f690724bdb2d6a3f3e254236da5cf49efb09376e7395f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73666e65616c2f6275696c646572732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sfneal/builders/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/cc66b623735fef55987ae95a9d2b67f0214ec1b7e5170891ae582fc1cfaa8f27/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73666e65616c2f6275696c646572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sfneal/builders)

Eloquent\\Builder wrapper with extended functionality.

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

[](#installation)

You can install the package via composer:

```
composer require sfneal/builders
```

Usage
-----

[](#usage)

Add the custom QueryBuilder to any Eloquent model by overwriting the built-in newEloquentBuilder() &amp; query() methods.

```
use Illuminate\Database\Eloquent\Builder;
use Sfneal\Builders\QueryBuilder;

class ExampleModel extends Model
{
    /**
     * Query Builder.
     *
     * @param $query
     * @return QueryBuilder
     */
    public function newEloquentBuilder($query)
    {
        return new QueryBuilder($query);
    }

    /**
     * Query Builder method for improved type hinting.
     *
     * @return QueryBuilder|Builder
     */
    public static function query()
    {
        return parent::query();
    }
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Stephen Neal](https://github.com/sfneal)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

PHP Package Boilerplate
-----------------------

[](#php-package-boilerplate)

This package was generated using the [PHP Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Every ~12 days

Recently: every ~0 days

Total

15

Last Release

1934d ago

Major Versions

0.7.0 → 1.0.02021-01-28

PHP version history (4 changes)0.1.0PHP ^7.1

0.3.0PHP &gt;=7.0

0.5.0PHP &gt;=7.1

0.7.0PHP &gt;=7.3

### Community

Maintainers

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

---

Top Contributors

[![sfneal](https://avatars.githubusercontent.com/u/23200215?v=4)](https://github.com/sfneal "sfneal (82 commits)")

---

Tags

buildersfneal

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sfneal-builders/health.svg)

```
[![Health](https://phpackages.com/badges/sfneal-builders/health.svg)](https://phpackages.com/packages/sfneal-builders)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[umbrellio/laravel-pg-extensions

Extensions for Postgres Laravel

102426.5k1](/packages/umbrellio-laravel-pg-extensions)[mpyw/laravel-local-class-scope

A tiny macro that reuse a global scope class as a local scope

24102.6k](/packages/mpyw-laravel-local-class-scope)

PHPackages © 2026

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