From 5b00a8ae336202371183be20b6fc14a02a5e05c5 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 11 Dec 2017 22:50:55 -0800 Subject: [PATCH] Use specific company_id column name in user search --- app/Http/Controllers/Api/UsersController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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')) {