simedkom/app/Enums/ContentType.php
Yoga Pangestu f9f1e60b2e feat(content recap): implement crud
- create model and migration
- relation to classification
- create resource
- create enum for support option
2025-12-09 15:36:50 +07:00

24 lines
450 B
PHP

<?php
namespace App\Enums;
use App\Traits\Enum\WithValue;
enum ContentType: string
{
use WithValue;
case FOTO = 'Foto';
case TEXT = 'Teks';
case GRAPHIC = 'Grafis';
case VIDEO = 'Video';
public static function options(): array
{
return array_combine(
array_map(fn ($status) => $status->value, self::cases()),
array_map(fn ($status) => $status->value, self::cases())
);
}
}