first commit
This commit is contained in:
20
app/Enums/ArticlePublishedStatusEnum.php
Executable file
20
app/Enums/ArticlePublishedStatusEnum.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum ArticlePublishedStatusEnum: int
|
||||
{
|
||||
case FALSE = 0;
|
||||
|
||||
case TRUE = 1;
|
||||
|
||||
case DELETE = 2;
|
||||
|
||||
public function toString(): string {
|
||||
return match($this) {
|
||||
ArticlePublishedStatusEnum::TRUE => '已发布',
|
||||
ArticlePublishedStatusEnum::FALSE => '未发布',
|
||||
ArticlePublishedStatusEnum::DELETE => '已删除',
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user