diff --git a/app/Filters/ClientFilters.php b/app/Filters/ClientFilters.php index 19642f1c25..9b658ab020 100644 --- a/app/Filters/ClientFilters.php +++ b/app/Filters/ClientFilters.php @@ -106,6 +106,15 @@ class ClientFilters extends QueryFilters return $this->builder->where('number', $number); } + public function group(string $group_id = ''): Builder + { + if (strlen($group_id) == 0) { + return $this->builder; + } + + return $this->builder->where('group_settings_id', $group_id); + } + /** * Filter based on search text. *