This commit is contained in:
2026-07-23 10:01:02 +07:00
commit 79f9e1d324
105 changed files with 5813 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace App\Enums;
enum ContentStatus: string
{
case DRAFT = 'draft';
case PUBLISHED = 'published';
case ARCHIVED = 'archived';
public function label(): string
{
return match ($this) {
self::DRAFT => 'Draft',
self::PUBLISHED => 'Dipublikasikan',
self::ARCHIVED => 'Diarsipkan',
};
}
public function value(): string
{
return match ($this) {
self::DRAFT => 'draft',
self::PUBLISHED => 'published',
self::ARCHIVED => 'archived',
};
}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\Enums;
enum ContentType: string
{
case PAGE = 'page';
case POST = 'post';
public function label(): string
{
return match ($this) {
self::PAGE => 'Laman',
self::POST => 'Pos',
};
}
public function value(): string
{
return match ($this) {
self::PAGE => 'page',
self::POST => 'post',
};
}
}
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Enums;
enum TaxonomyType: string
{
case CATEGORY = 'category';
case TAG = 'tag';
public function label(): string
{
return match ($this) {
self::CATEGORY => 'Kategori',
self::TAG => 'Tag',
};
}
public function value(): string
{
return match ($this) {
self::CATEGORY => 'category',
self::TAG => 'tag',
};
}
}