BlogAnnounced at MongoDB.local NYC 2024: A recap of all announcements and updatesLearn more >>
MongoDB Developer
PHP
plus
Sign in to follow topics
MongoDB Developer Centerchevron-right
Developer Topicschevron-right
Languageschevron-right
PHPchevron-right

Laravel MongoDB 4.2 Released, With Laravel 11 Support

Rishabh Bisht1 min read • Published Mar 18, 2024 • Updated Mar 20, 2024
PHP
Facebook Icontwitter iconlinkedin icon
Rate this announcement
star-empty
star-empty
star-empty
star-empty
star-empty
The PHP team is happy to announce that version 4.2 of the Laravel MongoDB integration is now available!

Highlights

Laravel 11 support
The MongoDB Laravel integration now supports Laravel 11, ensuring compatibility with the latest framework version and enabling developers to leverage its new features and enhancements. To apply transformation on model attributes, the new recommended way is to declare the Model::casts method.
Fixed transaction issue with firstOrCreate()
Previously, using firstOrCreate() in a transaction would result in an error. This problem has been resolved by implementing the underlying Model::createOrFirst() method with the atomic operation findOneAndUpdate.
Support for whereAll and whereAny
The library now supports the new methods whereAll and whereAny, introduced in Laravel 10.47.

Installation

This library may be installed or upgraded with:

Resources

Documentation and other resources to get you started with Laravel and MongoDB databases are shared below:
Give it a try today and let us know what you think! Please report any ideas, bugs, or feedback in the GitHub repository or the PHPORM Jira project, as we continue to improve and enhance the integration.

Facebook Icontwitter iconlinkedin icon
Rate this announcement
star-empty
star-empty
star-empty
star-empty
star-empty
Related
Tutorial

How To Build a Laravel + MongoDB Back End Service


Feb 01, 2024 | 15 min read
Tutorial

Symfony and MongoDB Workshop: Building a Rental Listing Application


Apr 08, 2024 | 3 min read
News & Announcements

MongoDB PHP Extension 1.13.0 Released


May 24, 2022 | 1 min read
Quickstart

Creating, Reading, Updating, and Deleting MongoDB Documents with PHP


Aug 24, 2023 | 8 min read
Table of Contents
  • Highlights