public function actionPhoto($id) { $photos = new Photos(); $dataProvider = $photos->findAll(['event_id' => $id]); return $this->render('photos', ['model' => $this->findModel($id), 'photo' => $photos, 'dataProvider' => $dataProvider]); }
public function run() { $array = ArrayHelper::toArray(Photos::findAll(['event_id' => $this->eventId])); return $this->render('photo', ['photo' => $array, 'event' => $this->eventId]); }
public function actionView($id) { $photos = Photos::findAll(['album_id' => $id]); return $this->render('view', compact('photos')); }