Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9108d27

Browse files
Docs changes v5.1 (#3174)
Adds raw() field conversions and Laravel Herd information
1 parent 3955807 commit 9108d27

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎docs/quick-start/download-and-install.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,19 @@ Download and Install the Dependencies
2828
Complete the following steps to install and add the {+odm-short+} dependencies
2929
to a Laravel web application.
3030

31+
.. tip::
32+
33+
As an alternative to the following installation steps, you can use Laravel Herd
34+
to install MongoDB and configure a Laravel MongoDB development environment. For
35+
more information about using Laravel Herd with MongoDB, see the following resources:
36+
37+
- `Installing MongoDB via Herd Pro
38+
<https://herd.laravel.com/docs/1/herd-pro-services/mongodb>`__ in the Herd
39+
documentation
40+
- `Laravel Herd Adds Native MongoDB Support
41+
<https://www.mongodb.com/developer/products/mongodb/laravel-herd-native-support/>`__
42+
in the MongoDB Developer Center
43+
3144
.. procedure::
3245
:style: connected
3346

‎docs/upgrade.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,19 @@ This library version introduces the following breaking changes:
114114
- In query results, the library converts BSON ``UTCDateTime`` objects to ``Carbon``
115115
date classes, applying the default timezone.
116116

117+
In v5.1, the library also performs this conversion to the ``Model::raw()``
118+
method results before hydrating a Model instance.
119+
117120
- ``id`` is an alias for the ``_id`` field in MongoDB documents, and the library
118121
automatically converts between ``id`` and ``_id`` when querying data. The query
119122
result object includes an ``id`` field to represent the document's ``_id`` field.
120123
Because of this behavior, you cannot have two separate ``id`` and ``_id`` fields
121124
in your documents.
122125

126+
In v5.1, the library also performs this conversion to the ``Model::raw()``
127+
method results before hydrating a Model instance. When passing a complex query
128+
filter, use the ``DB::where()`` method instead of ``Model::raw()``.
129+
123130
- Removes support for the ``$collection`` property. The following code shows
124131
how to assign a MongoDB collection to a variable in your ``User`` class in
125132
older versions compared to v5.0:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /