Skip to content

Commit c407eb6

Browse files
committed
Use new instance method
1 parent a933e84 commit c407eb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ public function is(self $model)
563563
public function hydrate($records)
564564
{
565565
return $this->newCollection($records)->transform(function ($attributes) {
566-
return (new static())->setRawAttributes($attributes)->setConnection($this->getConnectionName());
566+
return static::newInstance()->setRawAttributes($attributes);
567567
});
568568
}
569569

0 commit comments

Comments
 (0)