From f2f7fd8d50c15a05ef137f1ef5bc90323769f079 Mon Sep 17 00:00:00 2001 From: pxpm Date: Mon, 19 Aug 2024 11:24:23 +0100 Subject: [PATCH] remove raw order, let eloquent process the ordering --- src/app/Library/CrudPanel/Traits/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/Library/CrudPanel/Traits/Query.php b/src/app/Library/CrudPanel/Traits/Query.php index 14024e798f..a1726fe477 100644 --- a/src/app/Library/CrudPanel/Traits/Query.php +++ b/src/app/Library/CrudPanel/Traits/Query.php @@ -178,7 +178,7 @@ public function orderByWithPrefix($column_name, $column_direction = 'asc') $column_direction = strtolower($column_direction); if ($this->query->getQuery()->joins !== null) { - return $this->query->orderByRaw("\"{$this->model->getTableWithPrefix()}\".\"{$column_name}\" {$column_direction}"); + return $this->query->orderBy("{$this->model->getTableWithPrefix()}.{$column_name}", $column_direction); } return $this->query->orderBy($column_name, $column_direction);