mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -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
|
// Open output stream
|
||||||
$handle = fopen('php://output', 'w');
|
$handle = fopen('php://output', 'w');
|
||||||
|
|
||||||
License::with('company','manufacturer','category', 'supplier', 'adminuser')
|
$licenses= License::with('company',
|
||||||
->orderBy('created_at', 'DESC')
|
'manufacturer',
|
||||||
|
'category',
|
||||||
|
'supplier',
|
||||||
|
'adminuser')
|
||||||
|
->orderBy('created_at', 'DESC');
|
||||||
|
Company::scopeCompanyables($licenses)
|
||||||
->chunk(500, function ($licenses) use ($handle) {
|
->chunk(500, function ($licenses) use ($handle) {
|
||||||
$headers = [
|
$headers = [
|
||||||
// strtolower to prevent Excel from trying to open it as a SYLK file
|
// strtolower to prevent Excel from trying to open it as a SYLK file
|
||||||
|
|
Loading…
Reference in a new issue