diff --git a/resources/lang/it/translations.php b/resources/lang/it/translations.php index 8374326..dadf586 100644 --- a/resources/lang/it/translations.php +++ b/resources/lang/it/translations.php @@ -23,4 +23,4 @@ 'quick-translate-enter' => 'Inserisci la traduzione in ":lang":', 'quick-translate-save-and-continue' => 'Salva e continua', 'quick-translate-nothing' => 'Niente da tradurre!', -]; \ No newline at end of file +]; diff --git a/src/Resources/LanguageLineResource.php b/src/Resources/LanguageLineResource.php index aa5b45b..71a1a05 100644 --- a/src/Resources/LanguageLineResource.php +++ b/src/Resources/LanguageLineResource.php @@ -122,7 +122,11 @@ public static function getColumns(): array $columns = [ TextColumn::make('group_and_key') ->label(__('translation-manager::translations.group') . ' & ' . __('translation-manager::translations.key')) - ->searchable(['group', 'key']) + ->searchable(query: function (Builder $query, string $search): Builder { + return $query + ->where('group', 'like', "%{$search}%") + ->orWhere('key', 'like', "%{$search}%"); + }) ->getStateUsing(function (Model $record) { return $record->group . '.' . $record->key; }),