This commit is contained in:
xl
2024-11-06 20:59:30 +08:00
parent 41166dd998
commit f563126cd0
4 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -12,6 +12,7 @@ namespace Database;
use Database\Traits\HasBase;
use Exception;
use Kiri;
use Kiri\Di\Context;
/**
* Class HasMany
@@ -28,7 +29,6 @@ class HasMany extends HasBase
*/
public function get(): array|Collection|null
{
$relation = Kiri::getDi()->get(Relation::class);
return $relation->get($this->name);
return Context::get(Relation::class)->get($this->name);
}
}