Eager loading for custom report

This commit is contained in:
snipe 2016-09-19 23:52:20 -07:00
parent 2597a7b896
commit 5d8c06bc30

View file

@ -393,7 +393,7 @@ class ReportsController extends Controller
*/ */
public function postCustom() public function postCustom()
{ {
$assets = Asset::orderBy('created_at', 'DESC')->get(); $assets = Asset::orderBy('created_at', 'DESC')->with('company','assigneduser', 'assetloc','defaultLoc','assigneduser.userloc','model','supplier','assetstatus','model.manufacturer')->get();
$customfields = CustomField::get(); $customfields = CustomField::get();
$rows = [ ]; $rows = [ ];