form tabel

This commit is contained in:
2026-05-15 15:31:19 +07:00
parent 34d09d03bb
commit e0ab4bdace
24 changed files with 1853 additions and 182 deletions
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Enums;
enum LayoutForm: string
{
case ROW = 'form-row';
case COLUMN = 'form-column';
case VALUE = 'form-value';
case SECTION = 'form-section';
case HR_LINE = 'form-hr-line';
public function label(): string
{
return match($this) {
self::ROW => 'Row',
self::COLUMN => 'Column',
self::VALUE => 'Value',
self::SECTION => 'Section',
self::HR_LINE => 'HR Line',
};
}
public static function options(): array
{
return collect(self::cases())->map(fn ($case) => [
'value' => $case->value,
'label' => $case->label(),
])->toArray();
}
}