コード例 #1
0
ファイル: AdvertController.php プロジェクト: aiskimzhi/advert
 public function actionMyAdverts()
 {
     if (Currency::find()->where(['>', 'date', time()])->orderBy(['date' => SORT_DESC])->asArray()->one() == null) {
         $currency = new Currency();
         if ($currency->exchangeRates()) {
             Yii::$app->session->setFlash('warning', 'Exchange rates might differ from actual ones');
         }
     }
     $searchModel = new AdvertSearch();
     $dataProvider = $searchModel->getMyAdverts();
     return $this->render('my-adverts', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
コード例 #2
0
ファイル: AdvertController.php プロジェクト: aiskimzhi/repo
 public function actionMyAdverts()
 {
     $searchModel = new AdvertSearch();
     $dataProvider = $searchModel->getMyAdverts();
     return $this->render('my-adverts', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }