|
@ -39,6 +39,7 @@ use yii\data\ActiveDataProvider; |
|
|
use <?= ltrim($generator->baseControllerClass, '\\') ?>;
|
|
|
use <?= ltrim($generator->baseControllerClass, '\\') ?>;
|
|
|
use yii\web\NotFoundHttpException; |
|
|
use yii\web\NotFoundHttpException; |
|
|
use yii\filters\VerbFilter; |
|
|
use yii\filters\VerbFilter; |
|
|
|
|
|
use iron\widget\Excel; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* <?= $controllerClass ?> implements the CRUD actions for <?= $modelClass ?> model.
|
|
|
* <?= $controllerClass ?> implements the CRUD actions for <?= $modelClass ?> model.
|
|
@ -190,7 +191,7 @@ if (count($pks) === 1) { |
|
|
} else { |
|
|
} else { |
|
|
$dataProvider = $searchModel->search($params); |
|
|
$dataProvider = $searchModel->search($params); |
|
|
} |
|
|
} |
|
|
\iron\widget\Excel::export([ |
|
|
|
|
|
|
|
|
Excel::export([ |
|
|
'models' => $dataProvider->getModels(), |
|
|
'models' => $dataProvider->getModels(), |
|
|
'format' => 'Xlsx', |
|
|
'format' => 'Xlsx', |
|
|
'asAttachment' => true, |
|
|
'asAttachment' => true, |
|
|