PHPackages                             digitonic/eloquent-driver - 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. digitonic/eloquent-driver

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

digitonic/eloquent-driver
=========================

Allows you to store Statamic data in a database.

0.2.2(4y ago)0292PHP

Since Nov 19Pushed 4y agoCompare

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

READMEChangelog (3)Dependencies (2)Versions (7)Used By (0)

Statamic Eloquent Driver
========================

[](#statamic-eloquent-driver)

This package provides support for storing your Statamic data in a database rather than the filesystem.

This driver currently supports entries but not taxonomies, navigations, globals, or form submissions. We'll be working on those in the future.

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

[](#installation)

Install using Composer:

```
composer require statamic/eloquent-driver

```

Publish the config file:

```
php artisan vendor:publish --provider="Statamic\Eloquent\ServiceProvider"

```

Since Statamic uses UUIDs within content files by default, we provide two solutions depending on whether you need to use existing content.

### Fresh install of [statamic/statamic](https://github.com/statamic/statamic) (using incrementing ids)

[](#fresh-install-of-statamicstatamic-using-incrementing-ids)

If you're starting from scratch, we can use traditional incrementing integers for IDs.

- Delete `content/collections/pages/home.md`
- Change the structure `tree` in `content/collections/pages.yaml` to `{}`.
- Copy the `create_entries_table` migration into `database/migrations`.
- Run `php artisan migrate`.

### Starting from an existing site (using UUIDs)

[](#starting-from-an-existing-site-using-uuids)

If you're planning to use existing content, we can use the existing UUIDs. This will prevent you from needing to update any data or relationships.

- In the `config/statamic-eloquent-driver.php` file, change `model` to `UuidEntryModel`.
- Copy the `create_entries_table_with_strings` migration into `database/migrations`.
- Run `php artisan migrate`.
- Import entries into database with `php please eloquent:import-entries`.

Storing Users in a Database
---------------------------

[](#storing-users-in-a-database)

Statamic has a[ built-in users eloquent driver](https://statamic.dev/knowledge-base/storing-users-in-a-database) if you'd like to cross that bridge too.

Known issues
------------

[](#known-issues)

When saving a collection or reordering entries, the URIs of all entries in the collection will be updated, even if they haven't changed. This is an intensive operation and is being addressed in a [future version](https://github.com/statamic/cms/pull/2768) of Statamic core.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.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 ~72 days

Total

5

Last Release

1711d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104549?v=4)[Steven Richardson](/maintainers/richdynamix)[@richdynamix](https://github.com/richdynamix)

---

Top Contributors

[![jasonvarga](https://avatars.githubusercontent.com/u/105211?v=4)](https://github.com/jasonvarga "jasonvarga (12 commits)")[![edalzell](https://avatars.githubusercontent.com/u/6069653?v=4)](https://github.com/edalzell "edalzell (2 commits)")[![jackmcdade](https://avatars.githubusercontent.com/u/44739?v=4)](https://github.com/jackmcdade "jackmcdade (2 commits)")[![briward](https://avatars.githubusercontent.com/u/865261?v=4)](https://github.com/briward "briward (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/digitonic-eloquent-driver/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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