From eacddb303a777730507b0d85a610a8b48d931be3 Mon Sep 17 00:00:00 2001 From: Pavel Mironchik Date: Thu, 31 Dec 2020 16:27:22 +0600 Subject: [PATCH] Fix a typo. --- app/View/Components/SearchString.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php index d7f615cad..6bf3d25fd 100644 --- a/app/View/Components/SearchString.php +++ b/app/View/Components/SearchString.php @@ -29,23 +29,23 @@ class SearchString extends Component */ public function render() { - $searc_string = config('search-string'); + $search_string = config('search-string'); $this->filters = []; - if (!empty($searc_string[$this->model])) { - $columns = $searc_string[$this->model]['columns']; + if (!empty($search_string[$this->model])) { + $columns = $search_string[$this->model]['columns']; foreach ($columns as $column => $options) { // This column skip for filter if (!empty($options['searchable'])) { continue; } - + if (!is_array($options)) { $column = $options; } - + if (!$this->isFilter($column, $options)) { continue; } @@ -66,7 +66,7 @@ class SearchString extends Component protected function isFilter($column, $options) { $filter = true; - + if (empty($this->getFilterUrl($column, $options)) && (!isset($options['date']) && !isset($options['boolean']))) { $filter = false; } @@ -100,7 +100,7 @@ class SearchString extends Component } $name = trans('general.' . $column); - + if ($name == 'general.' . $column) { $name = trans('search_string.columns.' . $column); } @@ -108,7 +108,7 @@ class SearchString extends Component return $name; } - protected function getFilterType($options) + protected function getFilterType($options) { $type = 'select'; @@ -123,7 +123,7 @@ class SearchString extends Component return $type; } - protected function getFilterUrl($column, $options) + protected function getFilterUrl($column, $options) { $url = ''; @@ -143,11 +143,11 @@ class SearchString extends Component $url .= Str::slug($module_class[1], '-') . '::'; } - + if (strpos($column, '_id') !== false) { $column = str_replace('_id', '', $column); } - + $plural = Str::plural($column, 2); try { @@ -160,7 +160,7 @@ class SearchString extends Component return $url; } - protected function getFilterValues($column, $options) + protected function getFilterValues($column, $options) { $values = [];