diff --git a/Traits/QueryTrait.php b/Traits/QueryTrait.php index 1522209..201bfeb 100644 --- a/Traits/QueryTrait.php +++ b/Traits/QueryTrait.php @@ -118,9 +118,12 @@ abstract class QueryTrait extends Component implements ActiveQueryInterface, ISq public function __get(string $name) { - if (method_exists($this, $name)) { + if (property_exists($this, $name)) { return $this->$name; } + if (method_exists($this, $name)) { + return $this->$name(); + } return parent::__get($name); // TODO: Change the autogenerated stub }