From 1e1c062f563706c0a9a81230f9c9679400fd1b2f Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 12 Jul 2018 11:40:33 -0400 Subject: [PATCH] Fix spreadsheet export filename --- app/Http/Controllers/DashboardController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index c1544cd..4e7fd35 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -108,7 +108,7 @@ class DashboardController extends Controller { $model_class = Dashboard::getModel($model); 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); $items = $model_class::select($model_class::getDashboardColumnData('names', false))->get()->toArray(); array_unshift($items, $headings);