I already use transWhere function in my code,
You have to declare the column as an index in your $translatable array in your model. you can have more informations on the github page here : GitHub - rainlab/translate-plugin: Enables multi-lingual sites
If you search inside PHP file in the repository, you can find this :
/**
* scopeTransWhere applies a translatable index to a basic query. This scope will join the
* index table and can be executed neither more than once, nor with scopeTransOrder.
* @param Builder $query
* @param string $index
* @param string $value
* @param string $locale
* @return Builder
*/
public function scopeTransWhere($query, $index, $value, $locale = null, $operator = '=')
{
return $this->transWhereInternal($query, $index, $value, [
'locale' => $locale,
'operator' => $operator
]);
}
So, it’s written that you can add an operator as a 4th parameter.
i didn’t test it, but it seems logic to me. Try it and let us know