This package adds functionalities to the Eloquent model and Query builder for MongoDB, using the original Laravel API. This library extends the original Laravel classes, so it uses exactly the same methods. Make sure you have the MongoDB PHP driver installed. In case your Laravel version does NOT autoload the packages, add the service provider to config/app.php. For usage with Lumen, add the service provider in bootstrap/app.php. In this file, you will also need to enable Eloquent. You must however ensure that your call to $app->withEloquent(); is below where you have registered the MongodbServiceProvider. The service provider will register a MongoDB database extension with the original database manager. There is no need to register additional facades or objects. When using MongoDB connections, Laravel will automatically provide you with the corresponding MongoDB objects.

Features

  • Extends the original Laravel classes
  • Database testing
  • Extend the base model
  • Extend the Authenticable base model
  • MongoDB-specific operators
  • Inserts, updates and deletes

Project Samples

Project Activity

See All Activity >

Categories

UML, Build Tools

License

MIT License

Follow Laravel MongoDB

Laravel MongoDB Web Site

Other Useful Business Software
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Laravel MongoDB!

Additional Project Details

Programming Language

PHP

Related Categories

PHP UML Tool, PHP Build Tools

Registered

2021-10-05