Exemplo n.º 1
0
 /**
  * @return int
  */
 public function countCouples()
 {
     $tours = $this->getTours()->all();
     $ids = [];
     foreach ($tours as $t) {
         $ids[] = $t->id;
     }
     $size = Couple::find()->where(['tour_id' => $ids])->count();
     return $size;
 }
Exemplo n.º 2
0
 /**
  * Lists all Couple models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => Couple::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }