mongodb/laravel-mongodb — explained in plain English
Analysis updated 2026-06-22
Add MongoDB as a database to an existing Laravel 10+ application without rewriting any Eloquent query logic.
Build a Laravel app that stores flexible, variable-structure documents instead of fixed-column relational tables.
Migrate a Laravel project from MySQL to MongoDB while keeping the same model and controller code intact.
| mongodb/laravel-mongodb | moodle/moodle | the-benchmarker/web-frameworks | |
|---|---|---|---|
| Stars | 7,079 | 7,079 | 7,085 |
| Language | PHP | PHP | PHP |
| Setup difficulty | moderate | hard | hard |
| Complexity | 3/5 | 4/5 | 3/5 |
| Audience | developer | general | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a running MongoDB instance and a Laravel 10 or newer project.
Laravel is a popular PHP framework for building websites and web applications. It comes with a built-in system for talking to databases called Eloquent, which lets developers write database queries in a clean, readable style without writing raw SQL. By default, Eloquent works with traditional databases like MySQL and PostgreSQL. MongoDB is a different kind of database. Instead of organizing data into tables with fixed columns, it stores data as flexible documents, similar to JSON objects. This makes it a good fit for data that varies in structure from one record to the next. This package bridges those two worlds. It extends Laravel's Eloquent model and query builder so that developers can work with MongoDB using the exact same patterns and method names they already know from working with standard databases. The goal is to make switching to or adding MongoDB feel as natural as possible for a Laravel developer, without having to learn a completely different set of commands. The package is now officially maintained by MongoDB, Inc., which took over ownership from its original creator. It supports Laravel 10 and newer versions. For projects still running older versions of Laravel, earlier releases of the package remain available on GitHub. The README is sparse on setup details and points to the official MongoDB documentation site for full installation and usage guides. Bug reports are handled through MongoDB's JIRA issue tracker rather than GitHub issues. Security vulnerabilities have their own separate reporting process documented on the MongoDB website.
A Laravel package that lets you use MongoDB as your database with the exact same Eloquent model and query syntax you already know, no new commands to learn.
Mainly PHP. The stack also includes PHP, Laravel, MongoDB.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.