Concatenate 2 fields in infoList

Need to formatStateUsing of a textEntry in my infolist by concatenate his value + the value of another field
->formatStateUsing(function ($state, Repair $record) {
$state = PaymentStatus::getLabel($state);
$dep = $record->dep_payment_status; //value in euro
return $state . ' ' . $dep; // Partial paid 30€
})
->formatStateUsing(function ($state, Repair $record) {
$state = PaymentStatus::getLabel($state);
$dep = $record->dep_payment_status; //value in euro
return $state . ' ' . $dep; // Partial paid 30€
})
but i get this error Non-static method App\Enums\PaymentStatus::getLabel() cannot be called statically
1 Reply
Soundmit
SoundmitOP6mo ago
nevermind.. solved
 
$dep = $record->dep_payment_status; //value in euro
return $state->getLabel() . ' ' . $dep; // Partial paid 30€
 
$dep = $record->dep_payment_status; //value in euro
return $state->getLabel() . ' ' . $dep; // Partial paid 30€
Want results from more Discord servers?
Add your server