mongodb/laravel-mongodb
MongoDB integration for Laravel Eloquent and query builder. Extends core Laravel classes to use the same familiar API with MongoDB. Official mongodb/laravel-mongodb package, compatible with Laravel 10.x; docs and releases maintained by MongoDB.
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.6.0...5.7.0
This release fixes compatibility with Laravel 12.51.
DatabaseTransactionsManager in ManagesTransactions trait by @paulinevos in https://github.com/mongodb/laravel-mongodb/pull/3443delete() TypeError message to reference EloquentCollection by @zigzagdev in https://github.com/mongodb/laravel-mongodb/pull/3457Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.5.0...5.6.0
db:table command by @paulinevos in https://github.com/mongodb/laravel-mongodb/pull/3394Builder::raw() by @paulinevos in https://github.com/mongodb/laravel-mongodb/pull/3395QueryBuilder multiply and divide support by @faissaloux in https://github.com/mongodb/laravel-mongodb/pull/3373DocumentModel by @paulinevos in https://github.com/mongodb/laravel-mongodb/pull/3417Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.4.3...5.5.0
updated_at with $set by @guram-vashakidze in https://github.com/mongodb/laravel-mongodb/pull/3433Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.4.2...5.4.3
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.4.1...5.4.2
assert in DatabaseSessionHandler::read() by @tonivega in https://github.com/mongodb/laravel-mongodb/pull/3368getMongoDB method in tests by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3367Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.4.0...5.4.1
This release fixes the db:show and db:tables database introspection commands when using views.
The user id, IP address and user agent are now saved by the `mongodb' session driver if available.
getViews and categorize table types by @masterbater in https://github.com/mongodb/laravel-mongodb/pull/3327Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.3.1...5.4.0
.id field path to ._id by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3353Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.3.0...5.3.1
This is a maintenance release to enable compatibility with the version 2.0.0 of the MongoDB extension and library.
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.8.1...4.9.0
id to _id field rename in embedded documents by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3332Date::use(CarbonImmutable::class) is set by @saineshmamgain in https://github.com/mongodb/laravel-mongodb/pull/3342Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.2.2...5.3.0
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.2.1...5.2.2
_id check when updating a model by @itodor in https://github.com/mongodb/laravel-mongodb/pull/3329Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.2.0...5.2.1
The MongoDB team is pleased to announce the release of version 5.2.0 of the Laravel MongoDB Library.
This release requires an upgrade of the mongodb extesion to version 1.21 and the mongodb/mongodb library to version 1.21.
Connection::getMongoDB to getDatabase for naming consistency.spatie/laravel-query-builder v6Documentation for this library may be found in the Laravel MongoDB Manual.
This library may be installed or upgraded with:
composer require mongodb/laravel-mongodb:^5.2.0
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.1.1...5.2.0
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.1.0...5.1.1
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.8.0...4.8.1
_id and UTCDateTime in results of Model::raw() before hydratation by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3152_id to id in Schema::getColumns() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3160-> to dot . by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3170Query\Builder::pluck() with ObjectId as key by @fuyuki0511 in https://github.com/mongodb/laravel-mongodb/pull/3169Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.0.2...5.1.0
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.0.1...5.0.2
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/5.0.0...5.0.1
The PHP team is happy to announce that version 5.0.0 of the MongoDB integration for Laravel is now available. Feedbacks are welcome in this discussion.
id is always alias to _id in MongoDB. You can remove the protected $primaryKey = '_id' in model classes. Replace all $model->_id with $model->id.DateTimeInterface objects (including Carbon) are converted to MongoDB UTCDateTime by the query builder in queries, inserted and updated data. In results, MongoDB UTCDateTime objects are automatically converted to Carbon date with the default timezone. Some Eloquent cast my no longer be required.stdClass instead of array. Replace code like $item['name'] with $item->name.$collection is replaced by $table to customize the name of an Eloquent Model.Auth\PasswordResetServiceProvider, MongoDBQueueServiceProvider and Queue\Failed\MongoFailedJobProvider are removed. Remove them from your application. The MongoDB connection is compatible with the Laravel classesMongoDB\Laravel\Collection is replaced by MongoDB\Collection, and query are logged using MongoDB Monitoring Events.id an alias for _id by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3040Blueprint::background() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3132Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.8.0...5.0.0
The PHP team is happy to announce that version 5.0.0-RC1 of the MongoDB integration for Laravel is now available. This is a release candidate for which we'd like to receive your feedback in the discussion.
id is always alias to _id in MongoDB. You can remove the protected $primaryKey = '_id' in model classes. Replace all $model->_id with $model->id.DateTimeInterface objects (including Carbon) are converted to MongoDB UTCDateTime by the query builder in queries, inserted and updated data. In results, MongoDB UTCDateTime objects are automatically converted to Carbon date with the default timezone. Some Eloquent cast my no longer be required.stdClass instead of array. Replace code like $item['name'] with $item->name.$collection is replaced by $table to customize the name of an Eloquent Model.Auth\PasswordResetServiceProvider, MongoDBQueueServiceProvider and Queue\Failed\MongoFailedJobProvider are removed. Remove them from your application. The MongoDB connection is compatible with the Laravel classesMongoDB\Laravel\Connection is replaced by MongoDB\Connection, and query are logged using MongoDB Monitoring Events.id an alias for _id by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3040Blueprint::background() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3132Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.8.0...5.0.0-rc1
Connection::collection() and Schema::collection() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3062$collection property to customize the name by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3064Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.7.1...4.8.0
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.7.1...4.7.2
BusServiceProvider when BatchRepository is built by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3071Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.7.0...4.7.1
This release improves the compatibility with introspection features provided by Laravel (commands db:show and db:table) and the package barryvdh/laravel-ide-helper.
Connection::getServerVersion() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3043getTables() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3044getColumns() and getIndexes() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3045hasColumn() and hasColumns() method by @Alex-Belyi in https://github.com/mongodb/laravel-mongodb/pull/3001Query\Builder::upsert() by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/3053Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.6.0...4.7.0
DocumentModel trait to use any 3rd party model with MongoDB @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/2580HasSchemaVersion trait to help implementing the schema versioning pattern @florianJacques in #3021Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.5.0...4.6.0
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.4.1...4.5.0
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.4.0...4.4.1
_id: null to let it be autogenerated by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/2969mongodb driver for batch by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/2904[@mixin](https://github.com/mixin) on Model class by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/2981Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.3.0...4.4.0
[@mixin](https://github.com/mixin) on Model class by @GromNaN in https://github.com/mongodb/laravel-mongodb/pull/2981Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.3.0...4.3.1
The PHP team is happy to announce that version 3.8.5 of the MongoDB integration for Laravel is now available.
Release Highlights
Installation
This library may be installed or upgraded with:
composer require mongodb/laravel-mongodb:3.8.5
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/v3.8.5...v3.8.6
The PHP team is happy to announce that version 4.3.0 of the MongoDB integration for Laravel is now available.
Release Highlights
mongodb cache and lock drivers by @GromNaN in #2877artisan query:retry command by @GromNaN in #2838Documentation
Documentation for this library may be found one the Readme.
Installation
This library may be installed or upgraded with:
composer require mongodb/laravel-mongodb:4.3.0
Installation instructions for the mongodb extension may be found in the PHP.net documentation.
Full Changelog: https://github.com/mongodb/laravel-mongodb/compare/4.2.2...4.3.0
How can I help you explore Laravel packages today?