Extends Laravel Eloquent and the query builder to use MongoDB as a datastore with familiar Laravel syntax.
Overview
Laravel MongoDB is the official integration that lets Laravel applications treat MongoDB like other Eloquent-backed databases. It subclasses Laravel's model and query builder APIs so developers can reuse familiar patterns when reading and writing documents.
The package was formerly distributed under another vendor name and is now maintained by MongoDB, Inc. Documentation covers getting started, connecting to deployments including MongoDB Atlas, modeling collections as Eloquent models, querying and aggregating data, and using Laravel features such as authentication, caching, and queues where supported.
Major version upgrades may include breaking changes; compatibility tables relate library versions to Laravel releases. Releases are tagged and signed; issue tracking uses MongoDB's public JIRA project for bugs and feature requests.
It is installed as a Composer dependency inside Laravel projects rather than as a standalone server product.
Key features
- MongoDB-backed Eloquent models
- Laravel query builder compatibility
- Atlas and self-managed connections
- Aggregation and data interaction APIs
- Laravel auth and queue integrations
- Signed release tags
- Compatibility documentation by version
Use cases
- Laravel apps using MongoDB
- Document models with Eloquent
- Migrating from SQL-only Laravel stacks
- Atlas-hosted Laravel workloads