#105105th of 275 in Backends, databases and hosting
laravel-mongodb
Eloquent model and query builder extensions for MongoDB in Laravel
- Stars
- 7.1k
- License
- MIT
- Last commit
- Nov 2026
- Last release
- Nov 2026
- Language
- PHP
7,035 on 29 Apr 20267,058 on 18 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Official MongoDB package that extends Laravel's Eloquent models and query builder so they run against MongoDB using the standard Laravel API. It extends the original Laravel classes, so existing method names apply. This is a general PHP database integration, and the README describes no AI features.
Who it is for: Laravel developers who want to use MongoDB with Eloquent
Strengths
- Extends Laravel's own Eloquent and query builder classes, so the same methods apply
- Maintained by MongoDB, Inc., with documentation on mongodb.com
- Release tags are GPG-signed with the PHP team's key
- MIT license with recent releases (latest 2026-11-13)
Weaknesses
- No AI, LLM or vector search features described in the README
- README states compatibility with Laravel 10.x; older versions need old branches
- Issues are tracked in MongoDB's JIRA rather than GitHub issues
- Needs a MongoDB server; it is a driver layer, not a backend or host
What it needs
- no GPU
- Docker + Compose
- Needs MongoDB, Laravel, PHP
What changed
“Apply the connection prefix in the schema methods inherited from Laravel. hasTable(), dropIfExists(), getColumns() and getIndexes() now apply the prefix, as Laravel does. The migration repository rel…”
CVE-2026-118510. “Deny the server-side JavaScript operators $where, $function and $accumulator in DatabaseQuery, including nested in filters, projections, let and aggregation stages: by @paulinevos in #3651”
- 5.11.0 ↗ (opens in a new tab)Security fix
CVE-2026-88022, CVE-2026-96744, CVE-2026-88028, CVE-2026-88027. “PHPLARA-260 Force literal equality when a 3-arg where('=') has an operator array by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3581 CVE-2026-88022”
From the release notes. No flag means the note does not say so, not that the upgrade is safe.
Known problems
Open now, reported in the last 90 days
Reported, then fixed by a linked change
- FatalError: Declaration of MongoDB\Laravel\Query\Builder::timeout($seconds) must be compatible with Illuminate\Database\Query\Builder::timeout(?int $seconds): static ↗ (opens in a new tab)5 reactions · closed 11 Feb 2026Fixed by Fix Builder methods declaration for compatibility with Laravel 12.51 ↗ (opens in a new tab)
- The `Blueprint::morph` function throws an error ↗ (opens in a new tab)4 reactions · closed 25 Aug 2026Fixed by Fix morphs() support on MongoDB schema blueprints ↗ (opens in a new tab)
- Builder::timeout() conflicts with newly added Eloquent function ↗ (opens in a new tab)4 reactions · closed 11 Feb 2026Fixed by Fix Builder methods declaration for compatibility with Laravel 12.51 ↗ (opens in a new tab)
- withTrashed in MorphTo relation ↗ (opens in a new tab)3 reactions · closed 10 Jun 2026Fixed by PHPLARA-257 Replay query macros when eager loading MorphTo relations ↗ (opens in a new tab)
- [PHPLARA-311] `queue:retry all` throws TypeError with the documented failed-job config on 5.x (`ids()` returns ObjectId) ↗ (opens in a new tab)0 reactions · closed 27 Oct 2026Fixed by [13.x] Fix queue:retry with non-scalar failed job ids ↗ (opens in a new tab)
Titles are the reporters' own words, taken from the project's GitHub issues and ranked by reactions. We have not tried to reproduce any of them.
Also in Backends, databases and hosting
See all 275| Rank | Project | Score |
|---|---|---|
| 1 | bunJavaScript and TypeScript runtime with bundler, test runner and package manager | 94 out of 100 |
| 2 | coolifySelf-hosted Heroku and Vercel alternative that deploys apps and databases over SSH | 93 out of 100 |
| 3 | traefikHTTP reverse proxy and load balancer that auto-discovers routes from orchestrators | 93 out of 100 |
| #4 | appwriteBackend with auth, databases, storage, functions and an MCP server for agents | 93 out of 100 |
| #5 | medusaNode.js commerce platform with modular products, carts, orders and payments | 93 out of 100 |