From d664f39e499cf7d6e260b3cb77c40aeb69c1362c Mon Sep 17 00:00:00 2001 From: Rijan Adhikari Date: Mon, 16 Dec 2019 13:22:14 +0545 Subject: [PATCH] fix boolean casting for filterGroup $or This will fix the issue of boolean casting for filterGroup. Now it supports string in boolean value. i.e. it parse "true" to true and "false" to false. --- src/LaravelController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LaravelController.php b/src/LaravelController.php index 79a4c60..45058e9 100644 --- a/src/LaravelController.php +++ b/src/LaravelController.php @@ -116,7 +116,7 @@ protected function parseFilterGroups(array $filter_groups) $return[] = [ 'filters' => $filters, - 'or' => isset($group['or']) ? $group['or'] : false + 'or' => isset($group['or']) ? filter_var($group['or'], FILTER_VALIDATE_BOOLEAN) : false ]; }