File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,6 @@ public static function form(Form $form): Form
140140 ->content (fn (Result $ result ): ?string => $ result ->comments ),
141141 Forms \Components \Checkbox::make ('scheduled ' ),
142142 Forms \Components \Checkbox::make ('healthy ' ),
143-
144143 ])
145144 ->columns (1 )
146145 ->columnSpan ([
@@ -318,6 +317,7 @@ public static function table(Table $table): Table
318317 ->boolean ()
319318 ->toggleable ()
320319 ->toggledHiddenByDefault ()
320+ ->sortable ()
321321 ->alignment (Alignment::Center),
322322 Tables \Columns \TextColumn::make ('created_at ' )
323323 ->dateTime (config ('app.datetime_format ' ))
@@ -365,7 +365,12 @@ public static function table(Table $table): Table
365365 Tables \Filters \TernaryFilter::make ('healthy ' )
366366 ->nullable ()
367367 ->trueLabel ('Only healthy speedtests ' )
368- ->falseLabel ('Only unhealthy speedtests ' ),
368+ ->falseLabel ('Only unhealthy speedtests ' )
369+ ->queries (
370+ true: fn (Builder $ query ) => $ query ->where ('healthy ' , true ),
371+ false: fn (Builder $ query ) => $ query ->where ('healthy ' , false ),
372+ blank: fn (Builder $ query ) => $ query ,
373+ ),
369374 ])
370375 ->actions ([
371376 Tables \Actions \ActionGroup::make ([
You can’t perform that action at this time.
0 commit comments