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

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

daynnnnn/statamic-database
==========================

Allows you to store all Statamic data in a database.

v1.7.2(3y ago)73.6k4[1 issues](https://github.com/Daynnnnn/statamic-database/issues)PHP

Since Jun 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Daynnnnn/statamic-database)[ Packagist](https://packagist.org/packages/daynnnnn/statamic-database)[ RSS](/packages/daynnnnn-statamic-database/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (3)Versions (33)Used By (0)

Statamic Database Driver
------------------------

[](#statamic-database-driver)

An eloquent driver for Statamic V3 which supports:

- Asset Containers
- Blueprints
- Collections
- Entries
- Fieldsets
- Forms / Form Submissions
- Global Sets
- Navigation
- Taxonomies/Terms
- Trees

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

[](#installation)

From a standard Statamic V3 site, you can run: `composer require daynnnnn/statamic-database`

Add the config files: `php artisan vendor:publish --tag="statamic-database-config"`

Run migrations: `php please migrate`

Then in the register function of your AppServiceProvider, add:

```
public function register()
{
    if (config('statamic.database.blueprints')) {
        $this->app->singleton(
            'Statamic\Fields\BlueprintRepository',
            'Daynnnnn\StatamicDatabase\Blueprints\BlueprintRepository'
        );
    }

    if (config('statamic.database.fieldsets')) {
        $this->app->singleton(
            'Statamic\Fields\FieldsetRepository',
            'Daynnnnn\StatamicDatabase\Fieldsets\FieldsetRepository'
        );
    }
}

```

And that should be it!

Customising what data is stored in the Database
-----------------------------------------------

[](#customising-what-data-is-stored-in-the-database)

If you want to customise what data is stored in the database, you can override the default behaviour by altering the config file.

For example if you wanted to store some structure data as yaml so that can be easily inserted into version control you could do:

```
return [
    'assets_containers' => true,
    'asset_metas' => true,
    'blueprints' => false, // Default true
    'collections' => false, // Default true
    'collection_trees' => true,
    'entries' => true,
    'fieldsets' => false, // Default true
    'forms' => false, // Default true
    'form_submissions' => true,
    'globals' => true,
    'navigation' => true,
    'navigation_trees' => true,
    'taxonomies' => true,
    'terms' => true,
];
```

This will make sure that blueprints, collections, fieldset and forms are stored in yaml files, but still keep submissions and entries in the database.

Issues/Things to work on
------------------------

[](#issuesthings-to-work-on)

- No tests.
- Still needs user roles/groups adding.
- No real world testing done yet, so probably some more to be added.

Credits
-------

[](#credits)

Thanks to [@statamic](https://statamic.dev/) for creating the entries part of this in [statamic/eloquent-driver](https://github.com/statamic/eloquent-driver), which a lot of this was based off.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 94.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 ~16 days

Recently: every ~70 days

Total

29

Last Release

1359d ago

### Community

Maintainers

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

---

Top Contributors

[![Daynnnnn](https://avatars.githubusercontent.com/u/25618897?v=4)](https://github.com/Daynnnnn "Daynnnnn (70 commits)")[![mdeloughry](https://avatars.githubusercontent.com/u/1541665?v=4)](https://github.com/mdeloughry "mdeloughry (4 commits)")

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)[worksome/foggy

Foggy is a tool for making database dumps with some data removed/changed.

26571.7k1](/packages/worksome-foggy)

PHPackages © 2026

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