<b>Terima Kasih Buat Partisipasi Anda Telah Melakukan Voting</b>
<br><br>
<b>Hasil Voting Akan Ditunjukkan Jika Periode Voting Telah Berakhir</b>')
->send();
if($email){
Yii::$app->session->setFlash('success',"Voting Berhasil Dilakukan, Informasi bahwa anda telah berhasil melakukan Voting dikirim ke Email Anda");
}
else{
Yii::$app->session->setFlash('success',"Terima Kasih, Voting Berhasil Dilakukan");
}
}else{
Yii::$app->getSession()->setFlash('danger','Maaf, Pilihan Anda Belum Berhasil Disimpan pada Online Voting');
}
return$this->redirect(['online-voting']);
}
return$this->render('online_voting',[
'model'=>$model,
'arrayPilihan'=>$arrayPilihan,
'hasil_voting'=>$hasil_voting,
'voting'=>$voting,
]);
}
publicfunctionactionHasilVoting($id_voting){
$query_hasil_voting=HasilVoting::find()->select(['id_voting','id_user','pilihan','COUNT(pilihan) AS Jumlah_Voting '])->where(['id_voting'=>$id_voting])->groupBy(['pilihan']);
$query_hasil_voting=HasilVoting::find()->select(['id_voting','id_user','pilihan','COUNT(pilihan) AS Jumlah_Voting '])->where(['id_voting'=>$id_voting])->groupBy(['pilihan']);
$query_hasil_voting=HasilVoting::find()->select(['id_voting','id_user','pilihan','COUNT(pilihan) AS Jumlah_Voting '])->where(['id_voting'=>$id_voting])->groupBy(['pilihan']);