Fixed manufacturers item count

This commit is contained in:
snipe 2018-09-28 12:03:27 -07:00
parent 3b21a19491
commit eea65a3f26

View file

@ -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);
}