github mongodb/laravel-mongodb 5.0.0-rc1
5.0.0-RC1

latest releases: 5.1.0, 5.0.2, 5.0.1...
pre-release2 months ago

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.

Breaking changes for better compatibility with Laravel and Eloquent

  • 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.
  • Results of the Query Builder are returned as 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.
  • The providers Auth\PasswordResetServiceProvider, MongoDBQueueServiceProvider and Queue\Failed\MongoFailedJobProvider are removed. Remove them from your application. The MongoDB connection is compatible with the Laravel classes
  • MongoDB\Laravel\Connection is replaced by MongoDB\Connection, and query are logged using MongoDB Monitoring Events.

What's Changed

New Features

Other Changes

New Contributors

Full Changelog: 4.8.0...5.0.0-rc1

Don't miss a new laravel-mongodb release

NewReleases is sending notifications on new releases.