two different enum class in one resource

It seems like I may have identified a bug, but I'm not certain. I have a resource (RepairResource) where both in the table and in the infolist, I display a repairState and a paymentState, which are two different ENUMs.

When I need to use the ENUMs of paymentState, I encounter this error: "Pending" is not a valid backing value for the App\Enums\RepairStatus enum. This is because the enums are being searched in the wrong place.

Here's the code:

... 
use App\Enums\RepairStatus;
use App\Enums\PaymentStatus;
... 

# infolist
... 
Components\TextEntry::make('repair_status')
    ->label('Repair status')
    ->badge(),
Components\TextEntry::make('payment_status')
    ->label('Payment status')
    ->badge(),
... 

If there's an issue where the Pending value is being treated as a value for RepairStatus enum instead of PaymentStatus
Solution
Sounds like you specified the wrong cast
Was this page helpful?