Checklist not sorted correctly

I have this code:
                    CheckboxList::make('days')
                        ->label('Standaard beschikbaarheid')
                        ->relationship('days', 'name', function (Builder $query) {
                            return $query->orderBy('day_of_week');
                        })
                        ->getOptionLabelFromRecordUsing(fn (Model $record) => __('days.' . $record->name))

but it's not being sorted, does anyone know why?
Was this page helpful?