mirror of
http://124.126.16.154:8888/singularity/hyperf-admin.git
synced 2026-01-15 01:55:06 +08:00
fix: support custom sort cloumn
This commit is contained in:
@@ -203,6 +203,9 @@ abstract class AbstractController extends Controller
|
||||
}
|
||||
}
|
||||
$order_by = $this->options['order_by'] ?? '';
|
||||
if ($sortColumn = $this->request->input('_sort_column') && $sortType = $this->request->input('_sort_type')) {
|
||||
$order_by = $sortColumn . ' ' . $sortType;
|
||||
}
|
||||
if (empty($conditions) && !($this->options['defaultList'] ?? true)) {
|
||||
return compact('page', 'size', 'conditions', 'order_by', 'columns', 'table_options');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user