diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php index d3dfb87a9..86315ee12 100644 --- a/app/View/Components/SearchString.php +++ b/app/View/Components/SearchString.php @@ -80,6 +80,10 @@ class SearchString extends Component protected function getFilterKey($column, $options) { + if (isset($options['key'])) { + $column = $options['key']; + } + if (isset($options['relationship'])) { $column .= '.id'; } @@ -104,7 +108,7 @@ class SearchString extends Component if (strpos($this->model, 'Modules') !== false) { $module_class = explode('\\', $this->model); - $prefix = Str::slug($module_class[1], '-') . '::'; + $prefix = Str::kebab($module_class[1]) . '::'; $translation_keys[] = $prefix . 'general.'; $translation_keys[] = $prefix . 'search_string.columns.';