PHPackages                             allenjd3/mongo-entries - 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. allenjd3/mongo-entries

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

allenjd3/mongo-entries
======================

An example package that allows you to store Statamic entries in a database.

01PHP

Since Nov 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/allenjd3/mongo-entries)[ Packagist](https://packagist.org/packages/allenjd3/mongo-entries)[ RSS](/packages/allenjd3-mongo-entries/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Statamic Mongo Entries
======================

[](#statamic-mongo-entries)

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

[](#installation)

```
composer require allenjd3/mongo-entries --with-all-dependencies
```

Set up you database connection in `config/database.php`.

```
'connections' => [
    'mongodb' => [
        'driver' => 'mongodb',
        'dsn' => env('DB_DSN'),
        'database' => env('DB_DATABASE'),
    ],
],
```

Add the following to your `.env` file.

```
DB_CONNECTION=mongodb
DB_DSN=mongodb://

```

Usage
-----

[](#usage)

Start by creating a new Statamic site. If you are planning to use mongodb to store users, you can skip creating a user.

```
statamic new my-site
```

If you'd like to use authentication, you will need to change some config values.

First register MongoAuthServiceProvider in `config/app.php`.

```
'providers' => [
    // ...
    \Allenjd3\Mongo\Providers\MongoAuthServiceProvider::class,
],
```

Then change the `repository` config in `config/statamic/users.php`.

```
'repository' => 'mongo',
'repositories' => [
    'mongo' => [
        'driver' => 'mongo',
    ],
],
```

Add the following to the `providers` array in `config/auth.php`.

```
        'users' => [
            'driver' => 'mongo',
            'model' => App\Models\User::class,
        ],
```

Then in your App\\Model\\User class, you will need to extend the Allenjd3\\Mongo\\Auth\\User class as authenticatable

```
use Allenjd3\Mongo\Auth\User as Authenticatable;
```

and use the following trait-

```
//other traits
use HasUuids;
```

Cast the following in your App\\Model\\User class-

```
    protected $casts = [
        'preferences' => 'json',
        'super' => 'boolean',
    ];

    protected $dates = [
        'created_at',
        'updated_at',
        'email_verified_at',
    ];
```

Create a new user

```
php please make:user
```

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/44b6019e7c6e6f731c2eabfc1092af1bc2a55025c80b7718f5707014f2a975c1?d=identicon)[jdallen5](/maintainers/jdallen5)

---

Top Contributors

[![allenjd3](https://avatars.githubusercontent.com/u/8092154?v=4)](https://github.com/allenjd3 "allenjd3 (18 commits)")

### Embed Badge

![Health badge](/badges/allenjd3-mongo-entries/health.svg)

```
[![Health](https://phpackages.com/badges/allenjd3-mongo-entries/health.svg)](https://phpackages.com/packages/allenjd3-mongo-entries)
```

###  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)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M545](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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