/**
  * Lists all SurveyHasParticipant models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => SurveyHasParticipant::find()]);
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
 public function getDoneCountBySurveyId($id)
 {
     return SurveyHasParticipant::find()->where(['Survey_id' => $id])->count();
 }