Skip to content

Commit

Permalink
update search function in user
Browse files Browse the repository at this point in the history
  • Loading branch information
we-vikram-wri231 committed Jun 19, 2020
1 parent 87c47b5 commit 166cb28
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Entities/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -824,11 +824,11 @@ public static function getList($request,$roles)
if(isset($request['q']))
{
$list->where(function ($q) use ($request){
$q->where('first_name', 'LIKE', '%'.$request->q.'%')
->orWhere('last_name', 'LIKE', '%'.$request->q.'%')
->orWhere('middle_name', 'LIKE', '%'.$request->q.'%')
->orWhere('email', 'LIKE', '%'.$request->q.'%')
->orWhere('id', '=', $request->q);
$q->where('first_name', 'LIKE', '%'.$request['q'].'%')
->orWhere('last_name', 'LIKE', '%'.$request['q'].'%')
->orWhere('middle_name', 'LIKE', '%'.$request['q'].'%')
->orWhere('email', 'LIKE', '%'.$request['q'].'%')
->orWhere('id', '=', $request['q']);
});
}

Expand Down

0 comments on commit 166cb28

Please sign in to comment.