SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation 'like'

SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation ‘like’

this error is when use search in arabic

If you are using a specific collation for your database, you have to make sure it is the same across all database fields, tables and the database itself.