Skip to content

Commit 0bbb1ad

Browse files
Update src/Eloquent/Model.php
Co-authored-by: Jérôme Tamarelle <[email protected]>
1 parent 1e494b6 commit 0bbb1ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Eloquent/Model.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ public function attributesToArray()
352352
{
353353
$attributes = parent::attributesToArray();
354354

355+
// Because the original Eloquent never returns objects, we convert
355356
// MongoDB related objects to a string representation. This kind
356357
// of mimics the SQL behaviour so that dates are formatted
357358
// nicely when your models are converted to JSON.

0 commit comments

Comments
 (0)