© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
15 replies
Soundmit

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(),
... 
... 
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
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Two repeaters in one resource?
FilamentFFilament / ❓┊help
3y ago
Two Resource One Model
FilamentFFilament / ❓┊help
3y ago
Two Table in one resource using wizard
FilamentFFilament / ❓┊help
3y ago
Two list sfor one resource
FilamentFFilament / ❓┊help
15mo ago