// Exemple where it makes more sense to sort by descending order by defaultTables\Grouping\Group::make('priority') ->orderQueryUsing(function (Builder $query, string $direction) { $query->orderByRaw('FIELD(priority, "low", "medium", "high") ' . $direction); })