From ca6dc5c2b5454fab252e013b8a6c7a3d9e2d3cb3 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 2 Nov 2017 10:56:36 -0700 Subject: [PATCH] Eager load user location --- app/Http/Controllers/Api/UsersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 37dc05cacd..ed106cc49c 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -53,7 +53,7 @@ class UsersController extends Controller 'users.activated', 'users.avatar', - ])->with('manager', 'groups', 'location', 'company', 'department','throttle','assets','licenses','accessories','consumables') + ])->with('manager', 'groups', 'userloc', 'company', 'department','throttle','assets','licenses','accessories','consumables') ->withCount('assets','licenses','accessories','consumables'); $users = Company::scopeCompanyables($users);