Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
afsakar committed Aug 8, 2024
1 parent 7bd3e2f commit 5019a44
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 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.01,"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.318}}
{"version":"pest_2.35.0","defects":[],"times":{"P\\Tests\\ExampleTest::__pest_evaluable_it_can_test":0.002,"P\\Tests\\ArchTest::__pest_evaluable_it_will_not_use_debugging_functions":0.352}}
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ This is the contents of the published config file:

```php
return [
'main_table' => 'form_maker',

'table_prefix' => 'form_maker_',

'models' => [
//
],

'extra_collections' => [
// App\Models\User::class => 'User List',
],
Expand Down
2 changes: 0 additions & 2 deletions config/filament-form-maker.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

return [
'user' => App\Models\User::class, // @phpstan-ignore-line

'extra_collections' => [
// App\Models\User::class => 'User List',
],
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ parameters:
tmpDir: build/phpstan
checkOctaneCompatibility: true
checkModelProperties: true
checkMissingIterableValueType: false

9 changes: 7 additions & 2 deletions src/Models/Traits/HasOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Afsakar\FormMaker\Models\Traits;

use Afsakar\FormMaker\Models\FormBuilderCollection;
use Filament\Facades\Filament;
use Filament\Forms;

trait HasOptions
Expand Down Expand Up @@ -59,10 +60,14 @@ protected static function staticFormBuilderOptions(): Forms\Components\Group
->schema([
Forms\Components\Select::make('admin_ids')
->label('Kullanıcı E-postaları')
->hintIcon('tabler-info-circle', 'Forum\'un doldurulduktan sonra iletilmesini istediğiniz yöneticileri seçiniz.')
->hintIcon('tabler-info-circle', 'Forum\'un doldurulduktan sonra iletilmesini istediğiniz kullanıcıları seçiniz.')
->native(false)
->searchable()
->options(config('filament-form-maker.user')::pluck('name', 'id')->toArray())
->options(function () {
$userModel = Filament::auth()->getProvider()->getModel(); // @phpstan-ignore-line

return $userModel::all()->pluck('name', 'id')->toArray();
})
->multiple()
->nullable(),
]),
Expand Down

0 comments on commit 5019a44

Please sign in to comment.