Search for Arabic records
jadayash opened this issue · comments
I am using it to store Arabic text as well. There is no problem in searching though! I believe this is UTF-32 encoded.
Since the field is json you can just query like this:
Model::query()->where('title->ar', 'like', '%'.$search.'%');
or just loop all translations in the query:
$translations = ['ar', 'en'];
$qry = Model::query();
foreach($translations as $translation) {
$qry->where('title->'.$translation, 'like', '%'.$search.'%');
}
Thanks alot
Working Great