modify mysql result

This commit is contained in:
2022-04-28 03:15:44 +08:00
parent 6e7955f1d9
commit 7ea0bee73f
3 changed files with 18 additions and 13 deletions
+6 -4
View File
@@ -24,14 +24,16 @@ class HasMany extends HasBase
/**
* @param $name
* @param $arguments
* @return ActiveQuery|static
* @return static
*/
public function __call($name, $arguments)
{
if (!method_exists($this, $name)) {
return $this->_relation->getQuery($this->model::className())->$name(...$arguments);
}
return call_user_func([$this, $name], ...$arguments);
$this->_relation->getQuery($this->model::className())->$name(...$arguments);
} else {
call_user_func([$this, $name], ...$arguments);
}
return $this;
}
/**