public function getVenueNameById($id) { $raw = Venue::findOne($id); return $raw['name']; }
/** * Finds the Venue model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @param integer $VenueType_id * @return Venue the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id, $VenueType_id) { if (($model = Venue::findOne(['id' => $id, 'VenueType_id' => $VenueType_id])) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }