diff --git a/packages/forms/src/Commands/Concerns/CanGenerateForms.php b/packages/forms/src/Commands/Concerns/CanGenerateForms.php index e888f2eb40..0866150498 100644 --- a/packages/forms/src/Commands/Concerns/CanGenerateForms.php +++ b/packages/forms/src/Commands/Concerns/CanGenerateForms.php @@ -44,6 +44,7 @@ protected function getResourceFormSchema(string $model): string $componentData['type'] = match (true) { $type['name'] === 'boolean' => Forms\Components\Toggle::class, $type['name'] === 'date' => Forms\Components\DatePicker::class, + $type['name'] === 'time' => Forms\Components\TimePicker::class, in_array($type['name'], ['datetime', 'timestamp']) => Forms\Components\DateTimePicker::class, $type['name'] === 'text' => Forms\Components\Textarea::class, $columnName === 'image', str($columnName)->startsWith('image_'), str($columnName)->contains('_image_'), str($columnName)->endsWith('_image') => Forms\Components\FileUpload::class, diff --git a/packages/tables/src/Commands/Concerns/CanGenerateTables.php b/packages/tables/src/Commands/Concerns/CanGenerateTables.php index 113fbf68ab..c61acded95 100644 --- a/packages/tables/src/Commands/Concerns/CanGenerateTables.php +++ b/packages/tables/src/Commands/Concerns/CanGenerateTables.php @@ -91,6 +91,13 @@ protected function getResourceTableColumns(string $model): string $columnData['sortable'] = []; } + if (in_array($type['name'], [ + 'time', + ])) { + $columnData['time'] = []; + $columnData['sortable'] = []; + } + if (in_array($type['name'], [ 'datetime', 'timestamp',