Skip to content

Commit f9d637a

Browse files
authored
Fixes query attribute not existing under strict mode
1 parent a38c905 commit f9d637a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Traits/ModelCaching.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ public function __get($key)
2222
?? 0;
2323
}
2424

25+
if ($key === 'query') {
26+
return $this->query
27+
?? $this->newModelQuery();
28+
}
29+
2530
return parent::__get($key);
2631
}
2732

0 commit comments

Comments
 (0)