Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

That's probably MySQL rather than Laravel

You'll need to write a raw SQL command like:

$a = Items::whereRaw("BINARY code  = '$code' ");
Last updated 2 years ago.
0

When I write my pure PHP code and perform queries i had never before met this problem. Maybe by luck. But how can i solve without putting this on every query? Can i change any MAIN LARAVEL FILE so that this happens ALWAYS by default???

Last updated 2 years ago.
0

I found a solution. In the config file, wher the mysql configuration I put utf8_bin instead of unicode_ci and reset migrations.

Now it performs the queries correctly

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

pcfun19 pcfun19 Joined 23 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.