diff --git a/HasCount.php b/HasCount.php index f5e6945..778e44d 100644 --- a/HasCount.php +++ b/HasCount.php @@ -19,7 +19,7 @@ class HasCount extends HasBase */ public function get(): array|ModelInterface|null { - $key = $this->model::className() . '_' . $this->primaryId . '_' . $this->value; + $key = $this->model . '_' . $this->primaryId . '_' . $this->value; return $this->_relation->count($key); } diff --git a/HasMany.php b/HasMany.php index a3812b1..a92dd79 100644 --- a/HasMany.php +++ b/HasMany.php @@ -27,7 +27,7 @@ class HasMany extends HasBase */ public function get(): array|Collection|null { - $key = $this->model::className() . '_' . $this->primaryId . '_' . $this->value; + $key = $this->model . '_' . $this->primaryId . '_' . $this->value; return $this->_relation->get(md5($key)); } } diff --git a/HasOne.php b/HasOne.php index 6805e2f..ea25056 100644 --- a/HasOne.php +++ b/HasOne.php @@ -26,7 +26,7 @@ class HasOne extends HasBase */ public function get(): array|ModelInterface|null { - $key = $this->model::className() . '_' . $this->primaryId . '_' . $this->value; + $key = $this->model . '_' . $this->primaryId . '_' . $this->value; return $this->_relation->first(md5($key)); } }