Skip to content

Commit 353ffc1

Browse files
committed
edits
1 parent 6c274eb commit 353ffc1

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

docs/includes/query-builder/QueryBuilderTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,8 @@ public function testWhereDate(): void
153153
// begin query where date
154154
$result = DB::connection('mongodb')
155155
->table('movies')
156-
->where('released', new UTCDateTime(
157-
Carbon::create(2010, 1, 15, 0, 0, 0, 'UTC')
158-
))->get();
156+
->where('released', Carbon::create(2010, 1, 15, 0, 0, 0, 'UTC'))
157+
->get();
159158
// end query where date
160159

161160
$this->assertInstanceOf(\Illuminate\Support\Collection::class, $result);

docs/query-builder.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,10 @@ is ``2010, 1, 15, 0, 0, 0``, specified in a ``Carbon`` object:
359359
:start-after: begin query where date
360360
:end-before: end query where date
361361

362-
.. note:: Date Query Result Type
362+
.. note:: Date Query Filter and Result Type
363363

364364
Starting in {+odm-long+} v5.0, `Carbon <https://carbon.nesbot.com/docs/>`__
365-
objects passed as query filters, as shown in the preceding code example, are
365+
objects passed as query filters, as shown in the preceding code, are
366366
converted to ``UTCDateTime`` BSON values.
367367

368368
In query results, ``UTCDateTime`` BSON values in MongoDB are returned as ``Carbon``

docs/upgrade.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ This library version introduces the following breaking changes:
8585
the library converts the ``DateTimeInterface`` to a ``MongoDB\BSON\UTCDateTime``
8686
object. This conversion applies to ``DateTimeInterface`` objects passed as query
8787
filters to the ``where()`` method or as data passed to the ``insert()`` and
88-
``update()`` methods. For an example that passes a ``Carbon`` object to the
88+
``update()`` methods.
89+
90+
For an example that passes a ``Carbon`` object to the
8991
``DB::where()`` method, see the :ref:`laravel-query-builder-wheredate`
9092
section of the Query Builder guide.
9193

0 commit comments

Comments
 (0)