commit
b6dbdef04a
|
|
@ -7,18 +7,6 @@ use Excel;
|
|||
|
||||
class ExportController extends Controller
|
||||
{
|
||||
protected $exportableGrids = [
|
||||
'OrderDataGrid',
|
||||
'OrderInvoicesDataGrid',
|
||||
'OrderShipmentsDataGrid',
|
||||
'OrderRefundDataGrid',
|
||||
'CustomerDataGrid',
|
||||
'TaxRateDataGrid',
|
||||
'ProductDataGrid',
|
||||
'CMSPageDataGrid',
|
||||
'CartRuleCouponDataGrid'
|
||||
];
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
*
|
||||
|
|
@ -44,18 +32,6 @@ class ExportController extends Controller
|
|||
|
||||
$path = '\Webkul\Admin\DataGrids'.'\\'.last($gridName);
|
||||
|
||||
$proceed = false;
|
||||
|
||||
foreach ($this->exportableGrids as $exportableGrid) {
|
||||
if (last($gridName) == $exportableGrid) {
|
||||
$proceed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (! $proceed) {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
$gridInstance = new $path;
|
||||
|
||||
$records = $gridInstance->export();
|
||||
|
|
|
|||
Loading…
Reference in New Issue