Add eager loads

This commit is contained in:
Marcus Moore 2024-09-23 10:57:57 -07:00
parent e493cc964d
commit 54044bfa5e
No known key found for this signature in database

View file

@ -625,10 +625,20 @@ class UsersController extends Controller
$users = User::query()
->with([
'assets',
'accessories',
'consumables',
'licenses',
'assets.assetlog',
'assets.assignedAssets.assetlog',
'assets.assignedAssets.defaultLoc',
'assets.assignedAssets.location',
'assets.assignedAssets.model.category',
'assets.defaultLoc',
'assets.location',
'assets.model.category',
'accessories.category',
'accessories.manufacturer',
'consumables.assetlog',
'consumables.category',
'consumables.manufacturer',
'licenses.category',
])
->withTrashed()
->get();