diff --git a/src/Models/Concerns/HasAttributes.php b/src/Models/Concerns/HasAttributes.php index 263f4a1d..934c9ea4 100644 --- a/src/Models/Concerns/HasAttributes.php +++ b/src/Models/Concerns/HasAttributes.php @@ -467,7 +467,7 @@ protected function castAttribute(string $key, array|null $value): mixed */ protected function castRequiresArrayValue(string $key): bool { - return in_array($this->getCastType($key), ['collection']); + return $this->getCastType($key) === 'collection'; } /**