Closed andreshg112 closed 7 years ago
https://github.com/znck/belongs-to-through/issues/23
For the next situation:
preguntas: cod_preg: unsigned int, primary eval_rel_preg: cod_erp : unsigned int, primary id_preg: unsigned int, foreign(preguntas) eval_respuesta_estudiante: cod_ere: unsigned int, primary id_erp : unsigned int, foreign(eval_rel_preg)
We can relate the model EvaluacionRespuestaEstudiante (eval_respuesta_estudiante) to Pregunta (preguntas) through EvaluacionPregunta (eval_rel_preg).
public function pregunta() { public function pregunta() { return $this->belongsToThrough( Pregunta::class, [[EvaluacionPregunta::class, 'id_erp']], null, '', [Pregunta::class => 'id_preg'] ); } }
@znck merge please
I'll do it tomorrow.
https://github.com/znck/belongs-to-through/issues/23
For the next situation:
We can relate the model EvaluacionRespuestaEstudiante (eval_respuesta_estudiante) to Pregunta (preguntas) through EvaluacionPregunta (eval_rel_preg).