-
-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathPayoutStatus.php
More file actions
31 lines (27 loc) · 696 Bytes
/
PayoutStatus.php
File metadata and controls
31 lines (27 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace App\Enums;
enum PayoutStatus: string
{
case Pending = 'pending';
case Transferred = 'transferred';
case Failed = 'failed';
case Cancelled = 'cancelled';
public function label(): string
{
return match ($this) {
self::Pending => 'Pending',
self::Transferred => 'Transferred',
self::Failed => 'Failed',
self::Cancelled => 'Cancelled',
};
}
public function color(): string
{
return match ($this) {
self::Pending => 'yellow',
self::Transferred => 'green',
self::Failed => 'red',
self::Cancelled => 'gray',
};
}
}