This commit is contained in:
2022-09-29 18:58:32 +08:00
parent 02eddb98a2
commit 322168ff68
5 changed files with 19 additions and 29 deletions
+2 -1
View File
@@ -42,6 +42,7 @@ class HasMany extends HasBase
*/
public function get(): array|Collection|null
{
return $this->_relation->get($this->model::className(), $this->value);
$key = $this->model::className() . '_' . $this->primaryId . '_' . $this->value;
return $this->_relation->get($key);
}
}