diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 84f38fe158..27bb31fbf5 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -68,11 +68,11 @@ class UsersController extends Controller } if ($request->has('company_id')) { - $users = $users->where('company_id', '=', $request->input('company_id')); + $users = $users->where('users.company_id', '=', $request->input('company_id')); } if ($request->has('location_id')) { - $users = $users->where('location_id', '=', $request->input('location_id')); + $users = $users->where('users.location_id', '=', $request->input('location_id')); } if ($request->has('group_id')) {