改名
This commit is contained in:
+2
-1
@@ -148,11 +148,12 @@ class Collection extends AbstractCollection
|
|||||||
public function toArray(): array
|
public function toArray(): array
|
||||||
{
|
{
|
||||||
$array = [];
|
$array = [];
|
||||||
|
/** @var Model $value */
|
||||||
foreach ($this as $value) {
|
foreach ($this as $value) {
|
||||||
if (!is_object($value)) {
|
if (!is_object($value)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$array[] = $value->toArray();
|
$array[] = $value->setWith($this->query->with)->toArray();
|
||||||
}
|
}
|
||||||
$this->_item = [];
|
$this->_item = [];
|
||||||
return $array;
|
return $array;
|
||||||
|
|||||||
Reference in New Issue
Block a user