locales
in your config/voyager.php
file and enable
multilanguage:Translatable
Trait in your model and define the translatable attributes:whereTranslation
method.
For example, to search for the slug of a post, you'd usewhereTranslation
accepts the following parameter:field
the field you want to search invalue
the value you want to search forlocales
the locales you want to search in as an array. Leave as null
if you want to search all localesdefault
also search in the default value/locale. Defaults to true.