diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results index e17161a..d67d147 100644 --- a/.phpunit.cache/test-results +++ b/.phpunit.cache/test-results @@ -1 +1 @@ -{"version":"pest_2.35.0","defects":[],"times":{"P\\Tests\\ExampleTest::__pest_evaluable_it_can_test":0.001,"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.143}} \ No newline at end of file +{"version":"pest_2.35.0","defects":[],"times":{"P\\Tests\\ExampleTest::__pest_evaluable_it_can_test":0.001,"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.152}} \ No newline at end of file diff --git a/src/Filament/Resources/FormBuilderCollectionResource.php b/src/Filament/Resources/FormBuilderCollectionResource.php index ef2c826..05f8673 100644 --- a/src/Filament/Resources/FormBuilderCollectionResource.php +++ b/src/Filament/Resources/FormBuilderCollectionResource.php @@ -36,23 +36,27 @@ public static function form(Form $form): Form Forms\Components\TextInput::make('name') ->label('Adı') ->required(), - Forms\Components\Select::make('type') + Forms\Components\ToggleButtons::make('type') ->label('Tipi') ->live() + ->inline() ->options([ 'list' => 'Liste', 'model' => 'Model', ]) + ->default('list') ->required(), Forms\Components\Select::make('model') ->label('Model') ->visible(fn ($get) => $get('type') === 'model') ->live() + ->native(false) + ->preload() ->options(function () { $collections = FormBuilderHelper::getAllResources(); return [ - config('filament-form-maker.extra_collections'), + ...(array) config('filament-form-maker.extra_collections'), ...$collections, ]; })