PHPackages                             khaleelrasakh/laravel-mongodb - 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. khaleelrasakh/laravel-mongodb

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

khaleelrasakh/laravel-mongodb
=============================

A MongoDB based Eloquent model and Query builder for Laravel

v5.0.3(9mo ago)01291MITPHPPHP ^8.1CI failing

Since Oct 31Pushed 9mo agoCompare

[ Source](https://github.com/khaleelrasakh/laravel-mongodb)[ Packagist](https://packagist.org/packages/khaleelrasakh/laravel-mongodb)[ Docs](https://github.com/mongodb/laravel-mongodb)[ RSS](/packages/khaleelrasakh-laravel-mongodb/feed)WikiDiscussions 5.x Synced today

READMEChangelog (4)Dependencies (18)Versions (6)Used By (1)

Laravel MongoDB
===============

[](#laravel-mongodb)

This is fork supports disabling \_id to id automatic conversion and disablling returning results as arrays in aggregate instead of bson object based on database configuration. 'mongodb' =&gt; \[ 'driver' =&gt; 'mongodb', 'dsn' =&gt; env('DB\_URI'), 'database' =&gt; env('DB\_NAME'), 'options' =&gt; \[

```
                'ssl' => true,
                'AggregateCollectionArray'=>true, //add this to disable aggregate array
                'DisableAliasIdForResult'=>true, //add this to disable automatic _id conversion
                'tlsAllowInvalidCertificates' => true,
            ],
      ],

```

[![Latest Stable Version](https://camo.githubusercontent.com/2970b195852b7b36dece26ee83baebfbab68635d618148d8aac5fd1318725ba6/687474703a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6f6e676f64622f6c61726176656c2d6d6f6e676f64622e737667)](https://packagist.org/packages/mongodb/laravel-mongodb)[![Total Downloads](https://camo.githubusercontent.com/28b322696b80364b00946db4cfac45d138f23a4647fb012b6b3bd1ce2ff7d159/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d6f6e676f64622f6c61726176656c2d6d6f6e676f64622e737667)](https://packagist.org/packages/mongodb/laravel-mongodb)[![Build Status](https://camo.githubusercontent.com/e1d1e7b873831f0101fdd65ab234d82dc92f2275706b620f3689f456fb2931c5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6f6e676f64622f6c61726176656c2d6d6f6e676f64622f6275696c642d63692e796d6c)](https://github.com/mongodb/laravel-mongodb/actions/workflows/build-ci.yml)

This package adds functionalities to the Eloquent model and Query builder for MongoDB, using the original Laravel API. *This library extends the original Laravel classes, so it uses exactly the same methods.*

This package was renamed to `mongodb/laravel-mongodb` because of a transfer of ownership to MongoDB, Inc. It is compatible with Laravel 10.x. For older versions of Laravel, please refer to the [old versions](https://github.com/mongodb/laravel-mongodb/tree/3.9#laravel-version-compatibility).

Documentation
-------------

[](#documentation)

-
-

Release Integrity
-----------------

[](#release-integrity)

Releases are created automatically and the resulting release tag is signed using the [PHP team's GPG key](https://pgp.mongodb.com/php-driver.asc). To verify the tag signature, download the key and import it using `gpg`:

```
gpg --import php-driver.asc
```

Then, in a local clone, verify the signature of a given tag (e.g. `4.4.0`):

```
git show --show-signature 4.4.0
```

Note

Composer does not support verifying signatures as part of its installation process.

Reporting Issues
----------------

[](#reporting-issues)

Think you’ve found a bug in the library? Want to see a new feature? Please open a case in our issue management tool, JIRA:

- [Create an account and login.](https://jira.mongodb.org/)
- Navigate to the [PHPORM](https://jira.mongodb.org/browse/PHPORM) project.
- Click Create - Please provide as much information as possible about the issue type and how to reproduce it.

Note: All reported issues in JIRA project are public.

For general questions and support requests, please use one of MongoDB's [Technical Support](https://mongodb.com/docs/manual/support/) channels.

### Security Vulnerabilities

[](#security-vulnerabilities)

If you've identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions in [Create a Vulnerability Report](https://mongodb.com/docs/manual/tutorial/create-a-vulnerability-report).

Development
-----------

[](#development)

Development is tracked in the [PHPORM](https://jira.mongodb.org/projects/PHPORM/summary) project in MongoDB's JIRA. Documentation for contributing to this project may be found in [CONTRIBUTING.md](CONTRIBUTING.md).

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance56

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~17 days

Total

4

Last Release

291d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/186787981?v=4)[khaleelrasakh](/maintainers/khaleelrasakh)[@khaleelrasakh](https://github.com/khaleelrasakh)

---

Top Contributors

[![jenssegers](https://avatars.githubusercontent.com/u/194377?v=4)](https://github.com/jenssegers "jenssegers (673 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (220 commits)")[![mongodb-php-bot](https://avatars.githubusercontent.com/u/162451593?v=4)](https://github.com/mongodb-php-bot "mongodb-php-bot (175 commits)")[![Smolevich](https://avatars.githubusercontent.com/u/7188867?v=4)](https://github.com/Smolevich "Smolevich (116 commits)")[![divine](https://avatars.githubusercontent.com/u/48183131?v=4)](https://github.com/divine "divine (109 commits)")[![rustagir](https://avatars.githubusercontent.com/u/85902999?v=4)](https://github.com/rustagir "rustagir (65 commits)")[![norareidy](https://avatars.githubusercontent.com/u/107268623?v=4)](https://github.com/norareidy "norareidy (50 commits)")[![alcaeus](https://avatars.githubusercontent.com/u/383198?v=4)](https://github.com/alcaeus "alcaeus (47 commits)")[![rennokki](https://avatars.githubusercontent.com/u/21983456?v=4)](https://github.com/rennokki "rennokki (27 commits)")[![thilanga](https://avatars.githubusercontent.com/u/1523586?v=4)](https://github.com/thilanga "thilanga (25 commits)")[![pi0](https://avatars.githubusercontent.com/u/5158436?v=4)](https://github.com/pi0 "pi0 (24 commits)")[![duxet](https://avatars.githubusercontent.com/u/821707?v=4)](https://github.com/duxet "duxet (20 commits)")[![RemiCollin](https://avatars.githubusercontent.com/u/9589616?v=4)](https://github.com/RemiCollin "RemiCollin (17 commits)")[![hans-thomas](https://avatars.githubusercontent.com/u/39920372?v=4)](https://github.com/hans-thomas "hans-thomas (16 commits)")[![denissonleal](https://avatars.githubusercontent.com/u/9142644?v=4)](https://github.com/denissonleal "denissonleal (16 commits)")[![alexandre-butynski](https://avatars.githubusercontent.com/u/671662?v=4)](https://github.com/alexandre-butynski "alexandre-butynski (14 commits)")[![paulinevos](https://avatars.githubusercontent.com/u/5345273?v=4)](https://github.com/paulinevos "paulinevos (12 commits)")[![stephandesouza](https://avatars.githubusercontent.com/u/159077?v=4)](https://github.com/stephandesouza "stephandesouza (8 commits)")[![Tucker-Eric](https://avatars.githubusercontent.com/u/6483755?v=4)](https://github.com/Tucker-Eric "Tucker-Eric (7 commits)")[![apeisa](https://avatars.githubusercontent.com/u/131855?v=4)](https://github.com/apeisa "apeisa (7 commits)")

---

Tags

laraveldatabasemodeleloquentmongodbmongo

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/khaleelrasakh-laravel-mongodb/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)

PHPackages © 2026

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