File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/app/Http/Controllers/Operations Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public function search()
100100 // clear any past orderBy rules
101101 $ this ->crud ->query ->getQuery ()->orders = null ;
102102 // apply the current orderBy rules
103- $ this ->crud ->query ->orderBy ( $ column ['name ' ], $ column_direction );
103+ $ this ->crud ->query ->orderByRaw ( $ this -> crud -> model -> getTable (). ' . ' . $ column ['name ' ]. ' ' . $ column_direction );
104104 }
105105
106106 // check for custom order logic in the column definition
@@ -126,7 +126,7 @@ public function search()
126126 }
127127 });
128128 if (! $ hasOrderByPrimaryKey ) {
129- $ this ->crud ->query ->orderByDesc ($ this ->crud ->model ->getKeyName ());
129+ $ this ->crud ->query ->orderByRaw ($ this ->crud ->model ->getTable (). ' . ' . $ this -> crud -> model -> getKeyName (). ' DESC ' );
130130 }
131131
132132 $ entries = $ this ->crud ->getEntries ();
You can’t perform that action at this time.
0 commit comments