StudentProposal.php 685 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App;
  3. use Illuminate\Database\Eloquent\Model;
  4. class StudentProposal extends Model
  5. {
  6. public function teacher_details(){
  7. return $this->belongsTo('App\User','teacher_id');
  8. }
  9. public function student_details(){
  10. return $this->belongsTo('App\User','student_id');
  11. }
  12. public function institutes()
  13. {
  14. return $this->belongsTo('App\Institution', 'student_id','student_id');
  15. }
  16. public function scores()
  17. {
  18. return $this->belongsTo('App\Score', 'student_id','student_id');
  19. }
  20. public function work_experience()
  21. {
  22. return $this->belongsTo(Workexperience::class, 'student_id','student_id');
  23. }
  24. }