added histories to prevent n+1
This commit is contained in:
@ -549,7 +549,7 @@ class Invoices extends Controller
|
||||
public function export()
|
||||
{
|
||||
\Excel::create('invoices', function($excel) {
|
||||
$invoices = Invoice::with(['items', 'payments', 'totals'])->filter(request()->input())->get();
|
||||
$invoices = Invoice::with(['items', 'histories', 'payments', 'totals'])->filter(request()->input())->get();
|
||||
|
||||
$excel->sheet('invoices', function($sheet) use ($invoices) {
|
||||
$sheet->fromModel($invoices->makeHidden([
|
||||
|
Reference in New Issue
Block a user