- create enums for channel - create model and migration - create many to many relation to theme - feat resource
27 lines
569 B
PHP
27 lines
569 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use App\Traits\Enum\WithComment;
|
|
use App\Traits\Enum\WithValue;
|
|
|
|
enum Channel: string
|
|
{
|
|
use WithComment, WithValue;
|
|
|
|
case WEBSITE = 'Website';
|
|
case TIKTOK = 'Tiktok';
|
|
case YOUTUBE = 'Youtube';
|
|
case FACEBOOK = 'Facebook';
|
|
case INSTAGRAM = 'Instagram';
|
|
case OTHER = 'Other';
|
|
|
|
public static function options(): array
|
|
{
|
|
return array_combine(
|
|
array_map(fn ($status) => $status->value, self::cases()),
|
|
array_map(fn ($status) => $status->value, self::cases())
|
|
);
|
|
}
|
|
}
|