From eea65a3f268e31b04451a6cbf2bb414ded1a9fe8 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 28 Sep 2018 12:03:27 -0700 Subject: [PATCH] Fixed manufacturers item count --- app/Http/Controllers/Api/ManufacturersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ManufacturersController.php b/app/Http/Controllers/Api/ManufacturersController.php index 88d1d3a321..466c0858f9 100644 --- a/app/Http/Controllers/Api/ManufacturersController.php +++ b/app/Http/Controllers/Api/ManufacturersController.php @@ -83,7 +83,7 @@ class ManufacturersController extends Controller public function show($id) { $this->authorize('view', Manufacturer::class); - $manufacturer = Manufacturer::findOrFail($id); + $manufacturer = Manufacturer::withCount('assets')->withCount('licenses')->withCount('consumables')->withCount('accessories')->findOrFail($id); return (new ManufacturersTransformer)->transformManufacturer($manufacturer); }