mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Add eager loads to userscontroller
This commit is contained in:
parent
3870095a28
commit
cef7ddc719
|
@ -600,10 +600,21 @@ class UsersController extends Controller
|
||||||
|
|
||||||
$user = User::where('id', $id)
|
$user = User::where('id', $id)
|
||||||
->with([
|
->with([
|
||||||
'assets',
|
'assets.assetlog',
|
||||||
'accessories',
|
'assets.assignedAssets.assetlog',
|
||||||
'consumables',
|
'assets.assignedAssets.defaultLoc',
|
||||||
'licenses',
|
'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()
|
->withTrashed()
|
||||||
->first();
|
->first();
|
||||||
|
|
Loading…
Reference in a new issue