Laravel MongoDB
Introduction
Welcome to the documentation site for Laravel MongoDB, the official Laravel integration for MongoDB. This package extends methods in the PHP Laravel API to work with MongoDB as a datastore in your Laravel application. The Laravel Integration allows you to use Laravel Eloquent and Query Builder syntax to work with your MongoDB data.
Note
This documentation describes the mongodb/laravel-mongodb
package,
formerly named jenssegers/mongodb
. This package is now owned and
maintained by MongoDB, Inc. and is compatible with Laravel 10.x and
later.
Quick Start
Learn how to add the Laravel Integration to a Laravel web application, connect to MongoDB hosted on MongoDB Atlas, and begin working with data in the Quick Start section.
Upgrade Versions
Important
Laravel MongoDB v5.0 introduces breaking changes that might affect how you upgrade your application from a v4.x version.
Learn what changes you must make to your application to upgrade between major versions in the Upgrade Library Version section.
Usage Examples
See fully runnable code examples and explanations of common MongoDB operations in the Usage Examples section.
Fundamentals
To learn how to perform the following tasks by using the Laravel Integration, see the following content:
Issues & Help
Learn how to report bugs, contribute to the library, and find more resources in the Issues & Help section.
Feature Compatibility
Learn about Laravel features that the Laravel Integration supports in the Laravel Feature Compatibility section.
Compatibility
To learn more about which versions of Laravel MongoDB and Laravel are compatible, see the Compatibility section.