From 50d6256f6f39e5575cb394b14ac7387773cb473b Mon Sep 17 00:00:00 2001 From: 3m1n3nc3 Date: Fri, 13 Sep 2024 16:38:06 +0100 Subject: [PATCH] Add textarea to ConfigType cast --- app/Casts/ConfigType.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Casts/ConfigType.php b/app/Casts/ConfigType.php index 002d641..51d57f4 100644 --- a/app/Casts/ConfigType.php +++ b/app/Casts/ConfigType.php @@ -16,10 +16,11 @@ public function get(Model $model, string $key, mixed $value, array $attributes): { if (request()->isMethod('POST') || request()->isMethod('PUT')) { return match (true) { + $value === 'textarea' => 'string', $value === 'text' => 'string', $value === 'bool' => 'boolean', - $value === 'files' => 'file', $value === 'json' => 'array', + $value === 'files' => 'file', in_array($value, ['number', 'integer', 'int']) => 'numeric', default => $value, };