value => '未付款', self::Processing->value => '付款中', self::Success->value => '已付款', self::Fail->value => '支付失败', self::Refund->value => '已退款', ]; } public function text() { return data_get(self::options(), $this->value); } public function label() { $color = $this->color(); $name = $this->text(); return "{$name}"; } public function color() { return match ($this) { static::None => 'secondary', static::Processing => 'primary', self::Success => 'success', self::Fail => 'danger', self::Refund => 'secondary', default => 'dark', }; } public function dot() { $color = $this->color(); $name = $this->text(); return "  {$name}"; } }