thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.72k stars 2.67k forks source link

searching don't search for translated version of the field #5727

Open malozaibi opened 1 year ago

malozaibi commented 1 year ago

Laravel version

9.46.0

PHP version

8.0.7

Voyager version

1.6

Description of problem

When searching in Browse Bread, I can't search translated fields.

Weather in normal or server side pagination mode, I only search the default language. If I changed the language in the language button above and search, I will get no results for the other language content. like Title of the article for example.

I use Arabic as default and English as secondary language. I only get Arabic results.

Proposed solution

I think the solution is easy if used the translation query method of Voyager inside the index function of the baseController. with conditions to check if language is selected or make a dedicated button for search in different language.

Alternatives considered

No response

Additional context

No response