mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 12:17:05 -08:00
Add eager loads
This commit is contained in:
parent
e493cc964d
commit
54044bfa5e
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue