UserOfficialStatusEnum.php 299 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 <?php namespace App\Enums; enum UserOfficialStatusEnum: int { case SUBSCRIBE = 1; case UN_SUBSCRIBE = 0; public function label(): string { return match ($this) { self::SUBSCRIBE => '已关注', self::UN_SUBSCRIBE => '未关注', }; } }