fix issue with match
parent
7e19c63c4f
commit
7bfec123a5
|
|
@ -42,19 +42,25 @@ class Payment extends Model
|
||||||
|
|
||||||
public function getTypeAttribute($type)
|
public function getTypeAttribute($type)
|
||||||
{
|
{
|
||||||
return match ($type) {
|
switch ($type) {
|
||||||
PaymentType::Transaction() => 'Banküberweisung',
|
case PaymentType::Transaction():
|
||||||
PaymentType::Cash() => 'Barzahlung',
|
return 'Banküberweisung';
|
||||||
default => 'Überweisung via Cembra',
|
case PaymentType::Cash():
|
||||||
|
return 'Barzahlung';
|
||||||
|
default:
|
||||||
|
return 'Überweisung via Cembra';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTypeTextAttribute()
|
public function getTypeTextAttribute()
|
||||||
{
|
{
|
||||||
return match ($this->type) {
|
switch ($this->type) {
|
||||||
'Banküberweisung' => 'via Banküberweisung erhalten',
|
case 'Banküberweisung':
|
||||||
'Barzahlung' => 'in bar erhalten',
|
return 'via Banküberweisung erhalten';
|
||||||
default => 'via Cembra-Überweisung erhalten',
|
case 'Barzahlung':
|
||||||
|
return 'in bar erhalten';
|
||||||
|
default:
|
||||||
|
return 'via Cembra-Überweisung erhalten';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue