mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Use $customfields in closure
This commit is contained in:
parent
8774927b91
commit
fc07753a5c
|
@ -117,11 +117,11 @@ class ReportsController extends Controller
|
||||||
|
|
||||||
$customfields = CustomField::get();
|
$customfields = CustomField::get();
|
||||||
|
|
||||||
$response = new StreamedResponse(function(){
|
$response = new StreamedResponse(function() use ($customfields) {
|
||||||
// Open output stream
|
// Open output stream
|
||||||
$handle = fopen('php://output', 'w');
|
$handle = fopen('php://output', 'w');
|
||||||
|
|
||||||
Asset::with('assigneduser', 'assetloc','defaultLoc','assigneduser.userloc','model','supplier','assetstatus','model.manufacturer')->orderBy('created_at', 'DESC')->chunk(500, function($assets) use($handle) {
|
Asset::with('assigneduser', 'assetloc','defaultLoc','assigneduser.userloc','model','supplier','assetstatus','model.manufacturer')->orderBy('created_at', 'DESC')->chunk(500, function($assets) use($handle, $customfields) {
|
||||||
$headers=[
|
$headers=[
|
||||||
trans('general.company'),
|
trans('general.company'),
|
||||||
trans('admin/hardware/table.asset_tag'),
|
trans('admin/hardware/table.asset_tag'),
|
||||||
|
|
Loading…
Reference in a new issue