Does exist orWhere method in laravel-translatable? -
i use this library laravel translations
does exist orwheretranslationlike
method in laravel-translatable?
when use 2 methods work logiclty , conditions:
$query->wheretranslationlike('title', '%' . $term . '%'); $query->wheretranslationlike('decs', '%' . $term . '%');
you can this:
$query->where(function($q) use($term) { $q->wheretranslationlike('title', '%' . $term . '%'); })->orwhere(function($q) use($term) { $q->wheretranslationlike('decs', '%' . $term . '%'); });
Comments
Post a Comment