/** * @return \yii\db\ActiveQuery */ public function getIdPonto() { return $this->hasOne(Pontos::className(), ['id' => 'id_ponto']); }
/** * Finds the Pontos model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Pontos the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Pontos::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }