Ejemplo n.º 1
0
 public function actionView($id)
 {
     $model = Video::findOne($id);
     $course = $model->course;
     $author = $course->author;
     return $this->render('view', ['model' => $model, 'course' => $course, 'author' => $author, 'chapters' => Course::getVideoList($course->id)]);
 }
Ejemplo n.º 2
0
 /**
  * 课程详细页面
  * @param integer $id
  * @return mixed
  */
 public function actionView($id)
 {
     $model = Course::findOne($id);
     //        $dataProvider = new ActiveDataProvider([
     //            'query'      => $model->getVideos(),
     //        ]);
     //var_dump(Course::getVideoList($model->id));
     return $this->render('view', ['model' => $model, 'author' => $model->getAuthor(), 'chapters' => Course::getVideoList($model->id)]);
 }