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