Total Complexity | 16 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Transaction extends Model |
||
9 | { |
||
10 | use HasFactory; |
||
11 | |||
12 | protected $fillable = ['order_id', 'status', 'amount', 'driver', 'ref_no', 'token', 'description']; |
||
13 | protected $appends = ['gateway','toman','status_label','status_badge']; |
||
14 | |||
15 | public function parent() |
||
18 | } |
||
19 | |||
20 | public function getGatewayAttribute() |
||
29 | } |
||
30 | } |
||
31 | |||
32 | public function getTomanAttribute() |
||
33 | { |
||
34 | return $this->amount / 10; |
||
35 | } |
||
36 | |||
37 | public function getStatusLabelAttribute() |
||
50 | } |
||
51 | } |
||
52 | |||
53 | public function getStatusBadgeAttribute() |
||
66 | } |
||
67 | } |
||
69 |