Docs Menu
Docs Home
/ / /
Laravel MongoDB

Quick Start

On this page

  • Overview

This guide shows you how to add the Laravel MongoDB package to a new Laravel web application, connect to a MongoDB cluster hosted on MongoDB Atlas, and perform read and write operations on the data.


If you prefer to set up your development environment in GitHub Codespaces or Docker, see the linked code repository in the How to Build a Laravel + MongoDB Back End Service MongoDB Developer Center tutorial.

You can learn how to set up a local Laravel development environment and perform CRUD operations by viewing the Getting Started with Laravel and MongoDB MongoDB University Learning Byte.

If you prefer to connect to MongoDB by using the MongoDB PHP Library without Laravel, see Connecting to MongoDB in the MongoDB PHP Library documentation.

Laravel MongoDB extends the Laravel Eloquent and Query Builder syntax to store and retrieve data from MongoDB.

MongoDB Atlas is a fully managed cloud database service that hosts your MongoDB deployments. You can create your own free (no credit card required) MongoDB Atlas deployment by following the steps in this guide.

Follow the steps in this guide to create a sample Laravel web application that connects to a MongoDB deployment.


You can download the complete web application project by cloning the laravel-quickstart GitHub repository.

Next: Download and Install
← Laravel MongoDB

On this page