Skip to content

Commit aa47740

Browse files
committed
add to upgrade guide
1 parent 32576f2 commit aa47740

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/upgrade.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ Version 5.x Breaking Changes
7171

7272
This library version introduces the following breaking changes:
7373

74+
- The query builder returns results as objects, instead of as arrays.
75+
This change requires that you change array access to property access
76+
when interacting with query results.
77+
78+
The following code shows how to retrieve a query result and access a
79+
property from the result object:
80+
81+
.. code-block:: php
82+
:emphasize-lines: 4
83+
84+
DB::table('accounts')
85+
->where('name', 'Anita Charles')
86+
->first()
87+
->balance
88+
7489
- In query results, the library converts BSON ``UTCDateTime`` objects to ``Carbon``
7590
date classes, applying the default timezone.
7691

0 commit comments

Comments
 (0)