This commit is contained in:
2023-04-10 17:45:29 +08:00
parent b069bc425b
commit ecfe15c3ac
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -28,6 +28,6 @@ class HasOne extends HasBase
public function get(): array|ModelInterface|null
{
$relation = Kiri::getDi()->get(Relation::class);
return $relation->getQuery($this->name)->first();
return $relation->first($this->name);
}
}