StudentProposal.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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(User::class,'teacher_id');
  8. }
  9. public function student_details(){
  10. return $this->belongsTo(User::class,'student_id');
  11. }
  12. public function institutes()
  13. {
  14. return $this->belongsTo(Institution::class, 'student_id','student_id');
  15. }
  16. public function scores()
  17. {
  18. return $this->belongsTo(Score::class, 'student_id','student_id');
  19. }
  20. public function work_experience()
  21. {
  22. return $this->belongsTo(Workexperience::class, 'student_id','student_id');
  23. }
  24. public function proposal()
  25. {
  26. return $this->belongsTo(Proposal::class, 'proposal_id','id');
  27. }
  28. public function work_experience_date()
  29. {
  30. return $this->hasMany(Workexperience::class, 'student_id','student_id');
  31. }
  32. public function country_name()
  33. {
  34. return $this->belongsTo(Country::class, 'nationality', 'id');
  35. }
  36. }