mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
adds company scoping to license export
This commit is contained in:
parent
420225c2d5
commit
25f1167c9d
|
@ -308,8 +308,13 @@ class LicensesController extends Controller
|
|||
// Open output stream
|
||||
$handle = fopen('php://output', 'w');
|
||||
|
||||
License::with('company','manufacturer','category', 'supplier', 'adminuser')
|
||||
->orderBy('created_at', 'DESC')
|
||||
$licenses= License::with('company',
|
||||
'manufacturer',
|
||||
'category',
|
||||
'supplier',
|
||||
'adminuser')
|
||||
->orderBy('created_at', 'DESC');
|
||||
Company::scopeCompanyables($licenses)
|
||||
->chunk(500, function ($licenses) use ($handle) {
|
||||
$headers = [
|
||||
// strtolower to prevent Excel from trying to open it as a SYLK file
|
||||
|
|
Loading…
Reference in a new issue