column; } public function getDirection(): SortDirection { return $this->direction; } public function setAggregateRelation(string $relation, AggregateFunction $function): static { $this->aggregateRelation = $relation; $this->function = $function; return $this; } /** * Build the enum case for a direction. * Template: {FIELD_NAME}. * Template: {FIELD_NAME}_DESC. */ public function __toString(): string { return $this->enumName; } /** * Apply the ordering to the current Eloquent builder. */ abstract public function sort(Builder $builder): Builder; }