Skip to content

Commit

Permalink
Fixes #327
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Nov 5, 2014
1 parent 2bee522 commit e04cc80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/admin/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function getIndex()
// ADDED Eager Loading params for Model, Assigned User, Asset Location - decreases load time significantly
// Note the addition of AssetsStatus to complete the loading improvement.
// Debug Mode still has overhead, but much more manageable
$assets = Asset::with('model','assigneduser','assetloc','assetstatus','defaultLoc')->orderBy('asset_tag', 'ASC')->where('physical', '=', 1)->get();
$assets = Asset::with('model','assigneduser','assetstatus','defaultLoc')->orderBy('asset_tag', 'ASC')->where('physical', '=', 1)->get();

}

Expand Down

1 comment on commit e04cc80

@madd15
Copy link
Contributor

@madd15 madd15 commented on e04cc80 Nov 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to keep loading times down would using assigneduser.userloc in the query work with a change in the view to use $asset->assigneduser->userloc in place of $asset->assetloc

Please sign in to comment.