Skip to content

Commit

Permalink
Add textarea to ConfigType cast
Browse files Browse the repository at this point in the history
  • Loading branch information
3m1n3nc3 committed Sep 13, 2024
1 parent 155cc08 commit 50d6256
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Casts/ConfigType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 50d6256

Please sign in to comment.