Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
afsakar committed Aug 9, 2024
1 parent fe5106a commit d659174
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -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}}
{"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}}
8 changes: 6 additions & 2 deletions src/Filament/Resources/FormBuilderCollectionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
];
})
Expand Down

0 comments on commit d659174

Please sign in to comment.