->orderBy('is_primary','desc')
where
find()
Tables\Columns\TextColumn::make('squadrons.id') ->label('Squadron(s)') ->formatStateUsing(fn (string $state, $record): string => $record->squadrons->find($state)->abbrv) ->badge() ->color( function(string $state, $record) { $target = $record->squadrons->find($state); if($target->pivot->is_primary == '1') { return 'success'; } } ),