Enum color in DB
What is the best way to save the colors of an enum in the db, so that the administrator can change the color?
2 Replies
If I save the cache value I shouldn’t have slowdowns because it goes to read every time in the db, right?
Save only the name of the selected color in the database and create a custom model cast that casts it into your enum
perhaps, see if this is what you want
https://github.com/saade/filament-extra?tab=readme-ov-file#colorselect
https://github.com/saade/filament-extra?tab=readme-ov-file#class-color