Example #1
0
 public function rightRandomVideo()
 {
     $video = Video::getRandomVideo();
     return $this->render('rightWidget/rightRandomVideo', ['video' => $video]);
 }
Example #2
0
 public function actionRandomvideo()
 {
     $exclude = Yii::$app->request->post('exclude');
     $video = Video::getRandomVideo($exclude);
     return json_encode(['videoId' => $video->entity_id]);
 }