会导致索引失效:
User::query()->where(\DB::raw('BINARY `email`'), 'aAaBa@xxxx.com')->first();
索引不会失效:
User::query()->whereRaw("`email`= BINARY ?", ['aAaBa@xxxx.com'])->first();
会导致索引失效:
User::query()->where(\DB::raw('BINARY `email`'), 'aAaBa@xxxx.com')->first();
索引不会失效:
User::query()->whereRaw("`email`= BINARY ?", ['aAaBa@xxxx.com'])->first();