Commit ce03dacbe9c55deca50e30dddf59d2892f224d38

Authored by Alexey Boroda
1 parent d7331490

-Export to storage fix

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
controllers/StatisticsController.php
@@ -231,7 +231,7 @@ @@ -231,7 +231,7 @@
231 ->andFilterWhere($managerFilter) 231 ->andFilterWhere($managerFilter)
232 ->all(); 232 ->all();
233 233
234 - $file = fopen(\Yii::getAlias('@frontend/web/') . 'statistics_export.csv', 'w'); 234 + $file = fopen(\Yii::getAlias('@storage/') . 'statistics_export.csv', 'w');
235 foreach ($orders as $order) { 235 foreach ($orders as $order) {
236 $line = []; 236 $line = [];
237 /** 237 /**
@@ -270,7 +270,7 @@ @@ -270,7 +270,7 @@
270 'button' => Html::a( 270 'button' => Html::a(
271 Html::tag('i', '', [ 271 Html::tag('i', '', [
272 'class' => 'glyphicon glyphicon-download-alt' 272 'class' => 'glyphicon glyphicon-download-alt'
273 - ]) . ' Скачать', '/statistics_export.csv', [ 273 + ]) . ' Скачать', '/storage/statistics_export.csv', [
274 'class' => 'btn bg-olive', 274 'class' => 'btn bg-olive',
275 ]) 275 ])
276 ]; 276 ];