From 00d7b36c3653dc7ceed101c1c6976584879ca88f Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 11 Jul 2024 16:22:22 +0100 Subject: [PATCH] Eager load suppliers Signed-off-by: snipe --- app/Http/Controllers/Api/ConsumablesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Api/ConsumablesController.php b/app/Http/Controllers/Api/ConsumablesController.php index ccb0593d73..1665b7f4f0 100644 --- a/app/Http/Controllers/Api/ConsumablesController.php +++ b/app/Http/Controllers/Api/ConsumablesController.php @@ -28,7 +28,7 @@ class ConsumablesController extends Controller { $this->authorize('index', Consumable::class); - $consumables = Consumable::with('company', 'location', 'category', 'manufacturer') + $consumables = Consumable::with('company', 'location', 'category', 'supplier', 'manufacturer') ->withCount('users as consumables_users_count'); if ($request->filled('search')) {