1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Make Laravel Model::whereIn case-sensitive

Discussão em 'Outras Linguagens' iniciado por Hey, Setembro 28, 2024 às 04:52.

  1. Hey

    Hey Guest

    We have this code.

    $users = UserCode::whereIn('code', $codeList)->get();


    The issue with this code is, it is case insensitive. We want to the code to be case-sensitive.

    We tried something like:

    $users = UserCode::whereIn(DB::raw('BINARY `code`'), $codeList)->get();


    but this only returns the first and not of the list.

    Any help would be appreciated.

    Continue reading...

Compartilhe esta Página