In my project I am allowing user to search any thing. Recently facing an issue in Like query.
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_unicode_ci,COERCIBLE) for operation 'like'
I got a solution for this issue but now want to convert in laravel query.
How I can write user.name LIKE _latin1 '%aaa%' COLLATE latin1_swedish_ci
this in ->where() of laravel
and my current query code is $query->where('user.name', 'LIKE', '%'.$search.'%');