PHPackages                             jenssegers/mongodb-core - 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. jenssegers/mongodb-core

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

jenssegers/mongodb-core
=======================

A MongoDB based Query builder for Laravel

30324[2 issues](https://github.com/jenssegers/laravel-mongodb-core/issues)[1 PRs](https://github.com/jenssegers/laravel-mongodb-core/pulls)PHP

Since Dec 29Pushed 7y ago6 watchersCompare

[ Source](https://github.com/jenssegers/laravel-mongodb-core)[ Packagist](https://packagist.org/packages/jenssegers/mongodb-core)[ RSS](/packages/jenssegers-mongodb-core/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel MongoDB Core
====================

[](#laravel-mongodb-core)

The MongoDB Core package that powers [laravel-mongodb](https://github.com/jenssegers/laravel-mongodb).

This package provides core functionality to your Laravel application to connect to a Mongo database. It provides a Mongo database connector and a query builder. If you want to have MongoDB support for your Eloquent models, check out [laravel-mongodb](https://github.com/jenssegers/laravel-mongodb).

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

[](#contributing)

This package is still under heavy development. I'm starting a complete rewrite of [laravel-mongodb](https://github.com/jenssegers/laravel-mongodb), starting with splitting of the core functionality into a separate package.

Laravel has changed a lot since the original code was written. I have found a much more elegant way of extending the Laravel query builder with MongoDB support using grammars.

I am currently looking for contributors and reviewers to get this package ready for production so that it can be integrated in [laravel-mongodb](https://github.com/jenssegers/laravel-mongodb).

### How can I contribute?

[](#how-can-i-contribute)

#### 1. Reviewing

[](#1-reviewing)

Review code being pushed to this repository, and create issues to discuss if you may have found a better way to solve a certain functionality.

#### 2. Writing Tests

[](#2-writing-tests)

Tests are important to make sure this package remains stable during its course of development. If you want a new feature, or think something is not working like it should, please add a test proving the correct functionality, so that me or others can provide the correct implementation.

#### 3. Pull Requests

[](#3-pull-requests)

Pull requests are more than welcome to speed up the development of the package. Currently, there are quite some methods in [src/Query/Grammars/MongoGrammar.php](https://github.com/jenssegers/laravel-mongodb-core/blob/master/src/Query/Grammars/MongoGrammar.php) that throw a `not yet implemented` exception. I think implementing these are a great easy way to contribute!

#### 4. Documentation

[](#4-documentation)

This package provides quite some functionality, and documenting it will be a challenge. Contributions to add and/or improve documentation are certainly welcome!

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

[](#installation)

Make sure you have the MongoDB PHP driver installed. You can find installation instructions [here](http://php.net/manual/en/mongodb.installation.php).

Install the package using composer:

```
composer require jenssegers/mongodb-core

```

Testing
-------

[](#testing)

The tests can be run inside a [Docker](https://www.docker.com/community-edition#/download) container using:

```
make test

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity38

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/91980fbd02c3e65e0b2ec1c65e4ca0131f1bbc3929a0a11a7f4f12db5f2036e3?d=identicon)[jenssegers](/maintainers/jenssegers)

---

Top Contributors

[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (17 commits)")

### Embed Badge

![Health badge](/badges/jenssegers-mongodb-core/health.svg)

```
[![Health](https://phpackages.com/badges/jenssegers-mongodb-core/health.svg)](https://phpackages.com/packages/jenssegers-mongodb-core)
```

###  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.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/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)
