From 76154631e564b7b531e15b424f690f695cab0dd5 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Thu, 29 Sep 2022 22:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HasCount.php | 2 +- HasMany.php | 2 +- HasOne.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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)); } }