From 05aee6b8ff81ec8501f6535b0ee9438ab23b70db Mon Sep 17 00:00:00 2001 From: korki696 Date: Wed, 4 May 2022 12:17:00 -0700 Subject: [PATCH] Change formatting of relational column to allow proper sorting. --- src/Traits/WithSorting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Traits/WithSorting.php b/src/Traits/WithSorting.php index 4359dae74..4e234886c 100644 --- a/src/Traits/WithSorting.php +++ b/src/Traits/WithSorting.php @@ -80,7 +80,7 @@ public function applySorting(): Builder } elseif ($column->isBaseColumn()) { $this->setBuilder($this->getBuilder()->orderBy($column->getColumnSelectName(), $direction)); } else { - $this->setBuilder($this->getBuilder()->orderByRaw('"'.$column->getColumnSelectName().'"' . ' ' . $direction)); + $this->setBuilder($this->getBuilder()->orderByRaw('`'.$column->getColumnSelectName().'`' . ' ' . $direction)); } }