From b4db9ac94c8f63d108cfd53363fc1b10dcf2648a Mon Sep 17 00:00:00 2001 From: Awilum Date: Thu, 23 Jul 2020 23:40:34 +0300 Subject: [PATCH] feat(element-queries): fix orderBy() in the collect_filter #436 --- src/flextype/Support/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flextype/Support/helpers.php b/src/flextype/Support/helpers.php index f9f8c6bc..2487cc25 100644 --- a/src/flextype/Support/helpers.php +++ b/src/flextype/Support/helpers.php @@ -109,7 +109,7 @@ if (! function_exists('collect_filter')) { // Exec: order by if (isset($bind_order_by['order_by']['field']) && isset($bind_order_by['order_by']['direction'])) { - $collection->orderBy([$bind_order_by['order_by']['field'] => $direction[$bind_order_by['order_by']['direction']]]); + $collection->orderBy($bind_order_by['order_by']['field'], $direction[$bind_order_by['order_by']['direction']]); } // Exec: set max result