I have a problem with the search on my site. I have a search input to find products by name. If I type 'leña' (the problem is the strange characters).
This is in the controller
$termino = $_POST['search']);
$locale = LaravelLocalization::getCurrentLocale(); //es in this case
$products = Product::where('title', 'LIKE', "%\"{$locale}\":%{$termino}%");
This is the content of the field 'title' in the database.
{"es":"PAN DE LE\u00d1A"}
The search returns 0 results.
I am sure the problem is the codification and I don´t know how to resolve it.
The codification is utf8mb4.
Thanks