mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 18:29:15 +03:00
fix: user search to ilike op
This commit is contained in:
parent
0eb55c6be4
commit
a5dfa1b3fa
@ -85,9 +85,9 @@ export default class UserRepository {
|
||||
|
||||
if (search) {
|
||||
query
|
||||
.orWhere('first_name', 'like', `%${search}%`)
|
||||
.orWhere('last_name', 'like', `%${search}%`)
|
||||
.orWhereRaw(`CONCAT(first_name, ' ', last_name) = ?`, [search])
|
||||
.orWhere('first_name', 'ilike', `%${search}%`)
|
||||
.orWhere('last_name', 'ilike', `%${search}%`)
|
||||
.orWhereRaw(`CONCAT(first_name, ' ', last_name) ilike ?`, [search])
|
||||
.orWhere('email', 'like', `${search}`)
|
||||
.orWhere('id', 'like', `${search}`);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user