© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
MauFunction

Infolist TextEntry with enum casted attribute

Hi, how can I display an enum value when it is cast to an enum class in an infolist textentry? Im getting Object of class enum could not be converted to string.
Also how would I display multiple values using AsEnumCollection::class:EnumClass cast?
Solution
https://filamentphp.com/docs/3.x/support/enums#using-the-enum-label-with-a-text-entry-in-your-infolist

If you use a TextEntry with the Infolist Builder, and it is cast to an enum in your Eloquent model, Filament will automatically use the HasLabel interface to display the enum's label instead of its raw value.
Enums - Core Concepts - Filament
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

Enum in TextEntry of InfoList
FilamentFFilament / ❓┊help
2y ago
Infolist TextEntry
FilamentFFilament / ❓┊help
2y ago
Infolist - TextEntry - listWithLineBreaks
FilamentFFilament / ❓┊help
2y ago
Infolist TextEntry label
FilamentFFilament / ❓┊help
3y ago