Eager load suppliers

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-11 16:22:22 +01:00
parent 67d6f7119d
commit 00d7b36c36

View file

@ -28,7 +28,7 @@ class ConsumablesController extends Controller
{ {
$this->authorize('index', Consumable::class); $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'); ->withCount('users as consumables_users_count');
if ($request->filled('search')) { if ($request->filled('search')) {