PHPackages                             nodes/database - 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. nodes/database

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

nodes/database
==============

Makes it easier to work with models and repositories in Laravel

1.0.8(6y ago)311.3k22MITPHPPHP &gt;=5.6

Since Jan 7Pushed 6y ago1 watchersCompare

[ Source](https://github.com/nodes-php/nodes-php-database)[ Packagist](https://packagist.org/packages/nodes/database)[ Docs](http://nodesagency.com)[ RSS](/packages/nodes-database/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (6)Versions (24)Used By (2)

Database
--------

[](#database)

⚠️**This package is deprecated**⚠️

Most of this is build in Laravel now. No reason to use this anymore

A collection of our most used methods in pretty much every project we create at [Nodes](http://nodesagency.com)

[![Total downloads](https://camo.githubusercontent.com/b1b5d728ef7952355e112413994f3054cd72f32cb2d143e07aa6883633da8c47/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f6465732f64617461626173652e737667)](https://packagist.org/packages/nodes/database)[![Monthly downloads](https://camo.githubusercontent.com/43578affcf781cb34f8a909a0c5e1ae26c4e57b2fc5fd333836ccb14d056e50c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e6f6465732f64617461626173652e737667)](https://packagist.org/packages/nodes/database)[![Latest release](https://camo.githubusercontent.com/ab970fe63d5ee3de82d510821097be309b223a749aac0cef6ad98010aa6aef2f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f6465732f64617461626173652e737667)](https://packagist.org/packages/nodes/database)[![Open issues](https://camo.githubusercontent.com/2ef03ab7e397832218ed550a4ed3aadf36b7c3d3d1f2a0e16429a4f873dfce76/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6e6f6465732d7068702f64617461626173652e737667)](https://github.com/nodes-php/database/issues)[![License](https://camo.githubusercontent.com/a75f24be35291e8a4eaeeb896fc73660efb188952bd1323429e810be9aabb29a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e6f6465732f64617461626173652e737667)](https://packagist.org/packages/nodes/database)[![Star repository on GitHub](https://camo.githubusercontent.com/500149ee122c9df179d912224cb1406937d29872154b149ca8c398b49bc33188/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6e6f6465732d7068702f64617461626173652e7376673f7374796c653d736f6369616c266c6162656c3d53746172)](https://github.com/nodes-php/database/stargazers)[![Watch repository on GitHub](https://camo.githubusercontent.com/07fef169425e74d97a0a92b0001cf03c6db8a376b4dc9bf0a0f2f0e5a32120a0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f6e6f6465732d7068702f64617461626173652e7376673f7374796c653d736f6369616c266c6162656c3d5761746368)](https://github.com/nodes-php/database/watchers)[![Fork repository on GitHub](https://camo.githubusercontent.com/ff3a1b9390d2cfbd3ad342432e7b6cc4f7702f8e5aec75692d7f4de0eb1b96a5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6e6f6465732d7068702f64617461626173652e7376673f7374796c653d736f6369616c266c6162656c3d466f726b)](https://github.com/nodes-php/database/network)[![StyleCI](https://camo.githubusercontent.com/2d7edbff643faa6439fe4c2a4f6e7194b0e1f1556658acbfb73e6debcba8851a/68747470733a2f2f7374796c6563692e696f2f7265706f732f34393139343336382f736869656c64)](https://styleci.io/repos/49194368)

📝 Introduction
--------------

[](#-introduction)

There is a saying;

> Do not re-invent the wheel.

Therefore we've created a collection of all the methods we use in almost every project. We've also added some very cool ones which automatically throws an exception if a record could not be found and some other quite neat things.

📦 Installation
--------------

[](#-installation)

To install this package you will need:

- Laravel 5.1+
- PHP 5.5.9+

You must then modify your `composer.json` file and run `composer update` to include the latest version of the package in your project.

```
"require": {
    "nodes/database": "^1.0"
}
```

Or you can run the composer require command from your terminal.

```
composer require nodes/database:^1.0
```

⚙ Usage
-------

[](#-usage)

Create a new class and make it extend `Nodes\Database\Eloquent\Repository`.

At a later time, we'll create a more in-depth documentation of each method in the repository, but for now, we'll recommend you to look through the source and read the DocBlock for each method.

Check out all the available methods in the [src/Eloquent/Repository.php](https://github.com/nodes-php/database/blob/master/src/Eloquent/Repository.php) file.

### Global methods

[](#global-methods)

```
function render_sql(\Illuminate\Database\Query\Builder $query)
```

🏆 Credits
---------

[](#-credits)

This package is developed and maintained by the PHP team at [Nodes](http://nodesagency.com)

[![Follow Nodes PHP on Twitter](https://camo.githubusercontent.com/a898a5b14227bafa0c17c43be4f67460fe2b1dc3b88627d7b959e7fae4256a45/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f6e6f6465737068702e7376673f7374796c653d736f6369616c)](https://twitter.com/nodesphp) [![Tweet Nodes PHP](https://camo.githubusercontent.com/8c1a307180498b3bb360cf73e63da1bfa3afc0306f601be021acd1e85d2bb4e4/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f687474702f6e6f6465737068702e7376673f7374796c653d736f6369616c)](https://twitter.com/nodesphp)

📄 License
---------

[](#-license)

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 58.3% 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 ~83 days

Recently: every ~224 days

Total

19

Last Release

2285d ago

Major Versions

0.1.9 → 1.0.02016-06-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/3aaee2c2b7632254faa8a589817712bdab2c7d46778fb26994eef75b20ec9c08?d=identicon)[nodes](/maintainers/nodes)

---

Top Contributors

[![Casperhr](https://avatars.githubusercontent.com/u/1279756?v=4)](https://github.com/Casperhr "Casperhr (21 commits)")[![rugaard](https://avatars.githubusercontent.com/u/179868?v=4)](https://github.com/rugaard "rugaard (9 commits)")[![carmenioanamihaila](https://avatars.githubusercontent.com/u/20821982?v=4)](https://github.com/carmenioanamihaila "carmenioanamihaila (3 commits)")[![0hsn](https://avatars.githubusercontent.com/u/3197377?v=4)](https://github.com/0hsn "0hsn (1 commits)")[![rasmusebbesen](https://avatars.githubusercontent.com/u/944158?v=4)](https://github.com/rasmusebbesen "rasmusebbesen (1 commits)")[![Zeneo](https://avatars.githubusercontent.com/u/5598307?v=4)](https://github.com/Zeneo "Zeneo (1 commits)")

---

Tags

laraveldatabaseeloquentrepositorynodes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nodes-database/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[czim/laravel-repository

Repository for Laravel (inspired by and indebted to Bosnadev/Repositories)

54110.0k4](/packages/czim-laravel-repository)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3154.7k](/packages/toponepercent-baum)

PHPackages © 2026

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