Skip to content

Commit 83b2619

Browse files
Fixes query attribute not existing under strict mode (#465)
* Fixes `query` attribute not existing under strict mode * Update ModelCaching.php Signed-off-by: Mike Bronner <[email protected]> --------- Signed-off-by: Mike Bronner <[email protected]> Co-authored-by: Mike Bronner <[email protected]>
1 parent 5c67470 commit 83b2619

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: src/Traits/ModelCaching.php

+5
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)