diff --git a/backend/modules/shop/controllers/OrderController.php b/backend/modules/shop/controllers/OrderController.php index d18b007..166c69c 100755 --- a/backend/modules/shop/controllers/OrderController.php +++ b/backend/modules/shop/controllers/OrderController.php @@ -2,12 +2,15 @@ namespace backend\modules\shop\controllers; +use Throwable; use Yii; use backend\modules\shop\models\ars\Order; use backend\modules\shop\models\searchs\OrderSearch; +use yii\db\StaleObjectException; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; +use iron\widget\Excel; /** * OrderController implements the CRUD actions for Order model. @@ -102,6 +105,8 @@ class OrderController extends Controller * @param integer $id * @return mixed * @throws NotFoundHttpException if the model cannot be found + * @throws Throwable + * @throws StaleObjectException */ public function actionDelete($id) { @@ -138,7 +143,7 @@ class OrderController extends Controller } else { $dataProvider = $searchModel->search($params); } - \iron\widget\Excel::export([ + Excel::export([ 'models' => $dataProvider->getModels(), 'format' => 'Xlsx', 'asAttachment' => true, diff --git a/backend/modules/shop/controllers/TakingSiteController.php b/backend/modules/shop/controllers/TakingSiteController.php index b5daec9..9bfdd89 100755 --- a/backend/modules/shop/controllers/TakingSiteController.php +++ b/backend/modules/shop/controllers/TakingSiteController.php @@ -4,12 +4,15 @@ namespace backend\modules\shop\controllers; use backend\modules\shop\models\ars\Area; use backend\modules\shop\models\ars\City; +use Throwable; use Yii; use backend\modules\shop\models\ars\TakingSite; use backend\modules\shop\models\searchs\TakingSiteSearch; +use yii\db\StaleObjectException; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; +use iron\widget\Excel; /** * TakingSiteController implements the CRUD actions for TakingSite model. @@ -104,6 +107,8 @@ class TakingSiteController extends Controller * @param integer $id * @return mixed * @throws NotFoundHttpException if the model cannot be found + * @throws Throwable + * @throws StaleObjectException */ public function actionDelete($id) { @@ -140,7 +145,7 @@ class TakingSiteController extends Controller } else { $dataProvider = $searchModel->search($params); } - \iron\widget\Excel::export([ + Excel::export([ 'models' => $dataProvider->getModels(), 'format' => 'Xlsx', 'asAttachment' => true,