变更
This commit is contained in:
+5
-2
@@ -46,16 +46,19 @@ abstract class HasBase implements \Database\Traits\Relation
|
||||
public function __construct(public string $name)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param $arguments
|
||||
* @return static
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function __call($name, $arguments)
|
||||
{
|
||||
if ($name !== 'get') {
|
||||
return di(Relation::class)->getQuery($this->name)->$name(...$arguments);
|
||||
$relation = Kiri::getDi()->get(Relation::class);
|
||||
$relation->getQuery($this->name)->$name(...$arguments);
|
||||
return $this;
|
||||
} else {
|
||||
return $this->get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user