first commit

This commit is contained in:
f4ilji
2024-09-19 16:06:49 +05:00
commit b686638a39
1664 changed files with 428174 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace App\Enums;
use Filament\Support\Contracts\HasLabel;
use Filament\Support\Contracts\HasColor;
enum PostStatus: string implements HasLabel, HasColor
{
case VERIFICATION = 'verification';
case PUBLISHED = 'published';
case REJECTED = 'rejected';
public function getLabel(): ?string
{
return match ($this) {
self::VERIFICATION => 'На рассмотрении',
self::PUBLISHED => 'Опубликовано',
self::REJECTED => 'Отклонено',
};
}
public function getColor(): string|array|null
{
return match ($this) {
self::VERIFICATION => 'warning',
self::PUBLISHED => 'success',
self::REJECTED => 'gray',
};
}
}