Add eager loads to userscontroller
This commit is contained in:
parent
3870095a28
commit
cef7ddc719
1 changed files with 15 additions and 4 deletions
|
@ -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…
Add table
Reference in a new issue