Docs Menu
Docs Home
/ /

Laravel MongoDB

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.

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.

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.

See fully runnable code examples and explanations of common MongoDB operations in the Usage Examples section.

To learn how to perform the following tasks by using the Laravel Integration, see the following content:

Learn how to report bugs, contribute to the library, and find more resources in the Issues & Help section.

Learn about Laravel features that the Laravel Integration supports in the Laravel Feature Compatibility section.

To learn more about which versions of Laravel MongoDB and Laravel are compatible, see the Compatibility section.

Next

Quick Start