sort, self::SORTABLE_COLUMNS, true) ? $this->sort : 'created_at'; } /** * Direction; unknown values fall back to the per-column default * (name asc, everything else desc). */ public function normalizedDirection(): string { if (in_array($this->direction, ['asc', 'desc'], true)) { return $this->direction; } return $this->normalizedSort() === 'name' ? 'asc' : 'desc'; } }