mercredi 24 août 2016

Differentiate case sensitive in query result with eloquent+mysql

I'm trying to have a request with a case sensitive result with eloquent.

For example in my database I have 1ABC 2Abc 3abc

User::where('code', 'LIKE', "%$code%")->get() or User::where('code', '=', $code)->get()

but I have my 3 rows as result and I just want 2Abc



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire