I use the package Spatie/laravel-translatable to store my translated data in json in the database.
I have a column title :
{
"fr":"L\u2019\u00e9quipe",
"en":"Team",
"de":"Team"
}
As you can see, with the package, special characters are transformed into unicode.
When I want to search, it does not work (it's logical, because I'm looking for the word équipe
but in the database it says \u00e9quipe
)
$search = $request->get('search')
Events::where('title', 'LIKE', '%' . $search . '%')->published()->get();
How to search through Unicode for it to work?
Thank you