NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #3440 most downloaded on Packagist
A MongoDB based Eloquent model and Query builder for Laravel
Latest stable
5.12.1
Last release 9 days ago
13 Nov 2026
Release timing varies
gaps range from 8 days to 6 months
Rarely documented
notes for 14 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
175 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
PHPLARA-326 : Cache the encrypted field types per model instance by @GromNaN in #3671
whereTime() by @zigzagdev in #3603dynamic mapping as not dynamic in getIndexes() by @paulinevos in #3668Full Changelog: 5.12.0...5.12.1
This release adds first-class support for MongoDB Queryable Encryption. Encrypted fields are declared once in the connection configuration, and the Mo
This release adds first-class support for MongoDB Queryable Encryption. Encrypted fields are declared once in the connection configuration, and the MongoDB driver encrypts, decrypts and answers queries on them transparently. Eloquent models keep their plain shape: no attribute, property or cast is needed.
'driver_options' => [
'autoEncryption' => [
'keyVaultNamespace' => 'encryption.__keyVault',
'kmsProviders' => [
'local' => ['key' => base64_encode(file_get_contents(storage_path('encryption/master-key.bin')))],
],
'encryptedFieldsMap' => [
'patients' => [
'fields' => [
// `queryType` and the range options are flat, and a bare
// string declares a randomized, non-queryable field.
'ssn' => ['bsonType' => 'string', 'queryType' => 'equality'],
'billing_amount' => ['bsonType' => 'int', 'queryType' => 'range', 'min' => 0, 'max' => 5000, 'sparsity' => 1],
'billing' => 'object',
],
],
],
],
],The encrypted collection, its metadata collections and indexes, and the missing data keys are created by one command. The same creation is available with Schema::connection('mongodb')->createEncrypted('patients').
php artisan mongodb:encryption:create-collection
php artisan mongodb:encryption:statusQueryable Encryption requires MongoDB 8.0 or later for range queries (equality queries work from 7.0), on a replica set or a sharded cluster, with the Automatic Encryption Shared Library. Queries on encrypted fields cannot be combined with Atlas Search.
--dry-run preview: by @GromNaN in #3607__safeContent__ field from hydrated models and reject writes to it: by @GromNaN in #3652encryptedFieldsMap by namespace before handing it to the driver. The map was keyed by collection name, so automatic encryption ignored it and a write to a mapped collection that the server did not know as encrypted stored the fields in plaintext: by @GromNaN in #3657mongodb:encryption:rewrap-data-keys: by @paulinevos in #3602tlsOptions to ClientEncryption, for a KMS reachable only through a private CA: by @GromNaN in #3606mongodb:encryption:status: by @zigzagdev in #3624Connection API small. Only isAutoEncryptionEnabled() and getClientEncryption() are public, for diagnostics and for encryptExpression(). The rest of the encryption logic stays internal: by @GromNaN in #3660hasTable(), dropIfExists(), getColumns() and getIndexes() now apply the prefix, as Laravel does. The migration repository relies on hasTable(), so with a prefix every migration ran again. An application that calls these methods with the real collection name must pass the unprefixed name. hasCollection() and getCollection() are not Laravel methods and keep taking the real name: by @GromNaN in #3655where methods cannot compile: by @zigzagdev in #3612Attribute mutator: by @GromNaN in #3557MorphTo relations, so morphWith(), morphWithCount() and constrain() are no longer no-ops: by @GromNaN in #3559count(): by @MaddipatlaChetan24 in #3586$where, $function and $accumulator in DatabaseQuery, including nested in filters, projections, let and aggregation stages: by @paulinevos in #3651morphTo type is an Eloquent model before instantiating it, on both the lazy and the eager loading paths: by @paulinevos in #3589Database::selectCollection() with getCollection(): by @zigzagdev in #3630MongoBatchRepositoryTest mock for Laravel 13.32 named arguments: by @GromNaN in #3583AtlasSearchTest: by @MaddipatlaChetan24 in #3582transactionLevel() reflects the active transaction: by @zigzagdev in #3572TransactionTest: by @MaddipatlaChetan24 in #3600loadSum, loadAvg, loadMin and loadMax on relations: by @GromNaN in #3566DatabaseFailedJobProviderTest: by @GromNaN in #3609Full Changelog: 5.11.0...5.12.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
PHPLARA-260 Force literal equality when a 3-arg where('=') has an operator array by @GromNaN in #3581 CVE-2026-88022
Full Changelog: 5.10.0...5.11.0
fix: morphOne() using the wrong MorphOne relation class by @zigzagdev in #3564
morphOne() using the wrong MorphOne relation class by @zigzagdev in #3564Full Changelog: 5.9.1...5.10.0
Fix unmatched PHPStan ignore on ext-mongodb 1.x by @GromNaN in #3555
PHPORM-458 : Support auto-embedding by @paulinevos in #3531
_score) in ScoutEngine by @zigzagdev in #3534database-info Boost tool as alternative to database-schema by @paulinevos in #3544stdClass values in prepareFieldsForQuery by @zigzagdev in #3525MongoLock lottery never pruned expired locks by @zigzagdev in #3533Full Changelog: 5.8.2...5.9.0
PHPORM-492 Fix PHPDoc return and param types for raw() methods by @GromNaN in #3526
getCastType from mutating model-wide dateFormat by @zigzagdev in #3514Full Changelog: 5.8.1...5.8.2
PHPORM-495 Fix sort direction enum use by @alcaeus in #3519
Full Changelog: 5.8.0...5.8.1
PHPORM-305 Deprecate "array" cast storing as JSON-encoded string by @GromNaN in #3495
originalIsEquivalent method by @guram-vashakidze in #3439EmbedsRelations::embedsMany and EmbedsRelations::embedsOne public by @GromNaN in #2588increment & decrement on embedded models to delegate to Model::incrementOrDecrement() by @zigzagdev in #3510MongoStore::unserialize() for empty arrays and objects by @GromNaN in #3517Full Changelog: 5.7.1...5.8.0
Fix relation name passed to morphedByMany() by @bskl in #3491
morphedByMany() by @bskl in #3491MongoBatchRepository::rollBack() throwing when no active session by @GromNaN in #3492Full Changelog: 5.7.0...5.7.1
Laravel 13.x Compatibility by @laravel-shift in #3482
Full Changelog: 5.6.0...5.7.0
This release fixes compatibility with Laravel 12.51.
This release fixes compatibility with Laravel 12.51.
DatabaseTransactionsManager in ManagesTransactions trait by @paulinevos in #3443delete() TypeError message to reference EloquentCollection by @zigzagdev in #3457Full Changelog: 5.5.0...5.6.0
PHPORM-264 : Deprecate Mongo soft deletes trait by @paulinevos in #3408
db:table command by @paulinevos in #3394Builder::raw() by @paulinevos in #3395QueryBuilder multiply and divide support by @faissaloux in #3373DocumentModel by @paulinevos in #3417Full Changelog: 5.4.3...5.5.0
Fix overwriting updated_at with $set by @guram-vashakidze in #3433
updated_at with $set by @guram-vashakidze in #3433Full Changelog: 5.4.2...5.4.3
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.