flatten code

This commit is contained in:
imanghafoori 2019-04-02 21:50:44 +03:30
parent f2e4930e8e
commit 14cd4eb97e
1 changed files with 7 additions and 8 deletions

View File

@ -65,15 +65,14 @@ class ExportController extends Controller
if ($format == 'csv') {
return Excel::download(new DataGridExport($records), last($gridName).'.csv');
} else {
if ($format == 'xls') {
return Excel::download(new DataGridExport($records), last($gridName).'.xlsx');
} else {
session()->flash('warning', trans('admin::app.export.illegal-format'));
return redirect()->back();
}
}
if ($format == 'xls') {
return Excel::download(new DataGridExport($records), last($gridName).'.xlsx');
}
session()->flash('warning', trans('admin::app.export.illegal-format'));
return redirect()->back();
}