Select and TextColumn with Associative Array
May I make and external array like or
and in how to show the value in state of the key? eg. when selected -1, show the word 'Terminated' instate of -1. Thank you
5 Replies
for better dx, I recommend to use an enum class
https://filamentphp.com/docs/3.x/support/enums
but in you case
you can do like this
Thanks for your information.
Seems the enums is only available in Laravel 11 with php 8.2.x and above.
But currently I'm using php 8.1.x and only allow to install Laravel 10.
Enums are available with Laravel 10 and filamentphp 3 as I use them.
Thanks for your information.
I try running php artisan from Laravel 10 and it shown Command "make:enum" is not defined.
So I created another VPS with php 8.2 & L11. The Command "make:enum" is ready there.
Will copy the output from L11 to L10 and try it out.
Make enum may not exist but that doesn’t mean it isn’t supported…. Just create your own enum class without the make function.