You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920
  1. <?php
  2. namespace App\Filament\Forms\Components;
  3. use App\Models\Locale\State;
  4. use Filament\Forms\Components\Select;
  5. use Filament\Forms\Get;
  6. class StateSelect extends Select
  7. {
  8. protected function setUp(): void
  9. {
  10. parent::setUp();
  11. $this
  12. ->localizeLabel('State / Province')
  13. ->searchable()
  14. ->options(static fn (Get $get) => State::getStateOptions($get('country')));
  15. }
  16. }