From bfb52f1f9bcc2b4327044b1085c4ae55979a1715 Mon Sep 17 00:00:00 2001 From: Dmitriy Naydenko Date: Tue, 28 Aug 2018 15:31:06 +0300 Subject: [PATCH] Case insensitive default sorting direction --- src/ColumnSortable/Sortable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ColumnSortable/Sortable.php b/src/ColumnSortable/Sortable.php index 39df209..cd7b8a5 100755 --- a/src/ColumnSortable/Sortable.php +++ b/src/ColumnSortable/Sortable.php @@ -127,7 +127,7 @@ private function parseSortParameters(array $sortParameters) } $direction = array_get($sortParameters, 'order', []); - if ( ! in_array($direction, ['asc', 'desc'])) { + if ( ! in_array(strtolower($direction), ['asc', 'desc'])) { $direction = Config::get('columnsortable.default_direction', 'asc'); }