NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #1092 most downloaded on Packagist
A MongoDB based Eloquent model and Query builder for Laravel
Latest stable
5.12.0
Last release 27 days ago
26 Oct 2026
Release timing varies
gaps range from 8 days to 6 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
174 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Fix blueprint indexes inconsistencies
morphTo issuesFix Laravel compatibility issues
Nothing published for this version
Fixed issue with datetimes nog being converted
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Support for Laravel 5.1, sorry it took a while!
Nothing published for this version
Added support for hasColumn and hasColumns
hasColumn and hasColumnsMerged #383 to use reflection before calling methods in getAttribute
getAttributeAdded primary key alias for unique index
- Added cursor hints - Added driver options
Use aggregation framework for pagination.
Queries are now only logged when the database connection is in logging mode.
Fixes issue with sync for many to many relations
sync for many to many relationslists by primary keyYou can now also directly pass the DSN string to set up a connection.
Nothing published for this version
Nothing published for this version
Fixes issue with sync for many to many relations
sync for many to many relationslists by primary keyNothing published for this version
Fixes compileWhereIn for MongoDB 2.6.0
Nothing published for this version
Revert service provider code, fixes #280.
In this new version, embedded documents are no longer saved to the parent model using an attribute with a leading underscore. If you have a relation l
In this new version, embedded documents are no longer saved to the parent model using an attribute with a leading underscore. If you have a relation like embedsMany('Book'), these books are now stored under $model['books'] instead of $model['_books']. This was changed to make embedded relations less confusing for new developers.
If you want to upgrade to this new version without having to change all your existing database objects, you can modify your embedded relations to use a non-default local key including the underscore:
$this->embedsMany('Book', '_books');
Additionally, working with embedded models has become a lot easier. With this release, you can use the update, save and delete methods on the embedded models directly, instead of going through the relation instance of the parent model. Example:
$user = User::create(array('name' => 'John Doe'));
$address = $user->addresses()->create(array('city' => 'New York'));
$address->city = 'Paris';
$address->save();
Embedded relations will return a Collection of embedded items instead of a query builder. To allow a more query-like behavior, embedded relations return a modified version of the Collection class with support for the following additional operations:
This allows you to execute basic where queries on the collection results.
Embedded relations should now handle deeply nested relations a lot better. However, this does not produce optimal database queries, so use it with caution.
The model class now supports keys in dot notation. This was added to fix an issue where local and/or foreign keys for relations were inside a sub-object.
Push and pull operations now also change the internal attributes of the model, opposed to only executing a query in the previous version.
The query builder now supports projections using the project method. The array that you pass to this method will be passed to the find queries.
You can now also set a timeout value for the Cursor objects using the timeout method. This will automatically set the timeout on the Cursor result before converting it to an array of results.
The belongs to many relation was updated and now automatically pushes/pulls the id's to/from the model object. This prevents duplicate ids from being stored.
The included ReminderServiceProvider was modified so that password reminders are saved with a MongoDate.
Nothing published for this version
Adjust connection handling for Laravel 4.2.8
Enabled logging for raw queries.
Tweaked _id handling, fixes #225.
Switched to Laravel 4.2, the older version is available in the 4.1 branch.
Allows disabled timestamps for embedded models.
Adding initial port for has on hasOne and hasMany relations.
has on hasOne and hasMany relations.Added EmbedsOne relation, for more information check: https://github.com/jenssegers/Laravel-MongoDB#embedsone-relations
Added the delete method for embedded models
delete method for embedded modelsNothing published for this version
Fix _id conversion for toArray and toJson
toArray and toJsonEmbedsMany now returns the correct result for find
findtoJson now uses getDateFormatPrevent duplicate embedsMany objects
Modification for Laravel 4.1.24
Improved raw expressions on model classes, check out https://github.com/jenssegers/Laravel-MongoDB#raw-expressions
Adding associate and dissociate methods to the EmbedsMany relation, check out https://github.com/jenssegers/Laravel-MongoDB#embedsmany-relations
Fixes belongsToMany issue that did not correctly remove ids on related models.
New embedsMany logic, check out https://github.com/jenssegers/Laravel-MongoDB#embedsmany-relations
Added EmbedsMany, thanks to @alexandre-butynski
Adding a custom ReminderServiceProvider to allow MongoDB based password reminders.
Adding a new unique parameter to the push method to prevent duplicate items
Added relation compatibility with original Eloquent models, check the new readme section for more information
Switched to Laravel 4.1 packages, the older version is available in the 4.0 branch.
Added MongoDB specific operators: exists, type, mod, where, all, size, regex
Added many to many support, thanks to @DyeH
Improved Schema Builder now allows fluent operations
Small bug fix when searching MongoId's
- Added unset - Fixed push and pull behaviour
Removed deprecated DatabaseManager, but the old facade is still available.
- Added Schema Builder support.
Better batch insert processing.
This version still contains the DatabaseManager and DB facade which are marked as deprecated. These classes will be removed in future releases.
First release of the Eloquent model and Query Builder. This version still contains the DatabaseManager and DB facade which are marked as deprecated. These classes will be removed in future releases.
One column per quarter.