Skip to content

Commit b709624

Browse files
committed
Merge branch 'main' of github.com:stephenjude/filament-feature-flags
2 parents ec2c949 + 60a7d0f commit b709624

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Resources/FeatureSegmentResource.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
use Filament\Actions\EditAction;
77
use Filament\Facades\Filament;
88
use Filament\Forms\Components\Select;
9-
use Filament\Forms\Form;
109
use Filament\Resources\Resource;
11-
use Filament\Schemas\Components\Utilities\{Get, Set};
10+
use Filament\Schemas\Components\Utilities\Get;
11+
use Filament\Schemas\Components\Utilities\Set;
1212
use Filament\Schemas\Schema;
1313
use Filament\Support\Enums\FontWeight;
1414
use Filament\Tables;
@@ -54,7 +54,7 @@ public static function form(Schema $schema): Schema
5454

5555
Select::make('scope')
5656
->live()
57-
->afterStateUpdated(fn(Set $set) => $set('values', null))
57+
->afterStateUpdated(fn (Set $set) => $set('values', null))
5858
->required()
5959
->columnSpanFull()
6060
->options(FeatureSegment::segmentOptionsList()),
@@ -66,7 +66,7 @@ public static function form(Schema $schema): Schema
6666
->options([true => 'Activate', false => 'Deactivate'])
6767
->unique(
6868
ignoreRecord: true,
69-
modifyRuleUsing: fn(Unique $rule, Get $get) => $rule
69+
modifyRuleUsing: fn (Unique $rule, Get $get) => $rule
7070
->where('feature', $get('feature'))
7171
->where('scope', $get('scope'))
7272
->where('active', $get('active'))
@@ -92,7 +92,7 @@ public static function table(Table $table): Table
9292
->badge(),
9393
Tables\Columns\TextColumn::make('status')
9494
->badge()
95-
->color(fn(string $state): string => match ($state) {
95+
->color(fn (string $state): string => match ($state) {
9696
'ACTIVATED' => 'success',
9797
'DEACTIVATED' => 'danger',
9898
})
@@ -112,17 +112,17 @@ public static function table(Table $table): Table
112112
EditAction::make()
113113
->label('Modify')
114114
->modalHeading('Modify Feature Segment')
115-
->after(fn(FeatureSegment $record) => FeatureSegmentModified::dispatch(
115+
->after(fn (FeatureSegment $record) => FeatureSegmentModified::dispatch(
116116
$record,
117117
Filament::auth()->user()
118118
)),
119119

120120
DeleteAction::make()
121121
->label('Remove')
122122
->modalHeading('Removing this feature segment cannot be undone!')
123-
->modalDescription(fn(FeatureSegment $record) => $record->description)
124-
->after(fn() => FeatureSegmentRemoved::dispatch(Filament::auth()->user()))
125-
->before(fn(FeatureSegment $record) => RemovingFeatureSegment::dispatch(
123+
->modalDescription(fn (FeatureSegment $record) => $record->description)
124+
->after(fn () => FeatureSegmentRemoved::dispatch(Filament::auth()->user()))
125+
->before(fn (FeatureSegment $record) => RemovingFeatureSegment::dispatch(
126126
$record,
127127
Filament::auth()->user()
128128
)),
@@ -153,15 +153,15 @@ function ($segment) {
153153
->searchable()
154154
->columnSpanFull()
155155
->label(str($column)->plural()->title())
156-
->hidden(fn(Get $get) => $get('scope') !== $column)
156+
->hidden(fn (Get $get) => $get('scope') !== $column)
157157
->getOptionLabelsUsing(
158-
fn(array $values): array => $model::query()
158+
fn (array $values): array => $model::query()
159159
->whereIn($value, $values)
160160
->pluck($value, $key)
161161
->all()
162162
)
163163
->getSearchResultsUsing(
164-
fn(string $search): array => $model::query()
164+
fn (string $search): array => $model::query()
165165
->where($value, 'like', "%{$search}%")
166166
->limit(50)->pluck($value, $key)
167167
->toArray()

0 commit comments

Comments
 (0)