Add eager loads to userscontroller

This commit is contained in:
Marcus Moore 2024-09-23 16:10:21 -07:00
parent 3870095a28
commit cef7ddc719
No known key found for this signature in database

View file

@ -600,10 +600,21 @@ class UsersController extends Controller
$user = User::where('id', $id)
->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.assetlog',
'accessories.category',
'accessories.manufacturer',
'consumables.assetlog',
'consumables.category',
'consumables.manufacturer',
'licenses.category',
])
->withTrashed()
->first();