mirror of
https://github.com/prurigro/hypothetical.git
synced 2024-11-22 07:54:11 -05:00
Fix spreadsheet export filename
This commit is contained in:
parent
8ed853a024
commit
1e1c062f56
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ class DashboardController extends Controller {
|
||||||
$model_class = Dashboard::getModel($model);
|
$model_class = Dashboard::getModel($model);
|
||||||
|
|
||||||
if ($model_class != null && $model_class::$export) {
|
if ($model_class != null && $model_class::$export) {
|
||||||
$filename = preg_replace([ '/\ /', '/[^a-z0-9\-]/' ], [ '-', '' ], strtolower(env('APP_NAME'))) . '-' . $model . '-' . date('m-d-Y');
|
$filename = preg_replace([ '/\ /', '/[^a-z0-9\-]/' ], [ '-', '' ], strtolower(env('APP_NAME'))) . '-' . $model . '-' . date('m-d-Y') . '.xlsx';
|
||||||
$headings = $model_class::getDashboardColumnData('headings', false);
|
$headings = $model_class::getDashboardColumnData('headings', false);
|
||||||
$items = $model_class::select($model_class::getDashboardColumnData('names', false))->get()->toArray();
|
$items = $model_class::select($model_class::getDashboardColumnData('names', false))->get()->toArray();
|
||||||
array_unshift($items, $headings);
|
array_unshift($items, $headings);
|
||||||
|
|
Loading…
Reference in a new issue