123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace App;
- use Illuminate\Database\Eloquent\Model;
- class StudentProposal extends Model
- {
- public function teacher_details(){
- return $this->belongsTo(User::class,'teacher_id');
- }
- public function student_details(){
- return $this->belongsTo(User::class,'student_id');
- }
- public function institutes()
- {
- return $this->belongsTo(Institution::class, 'student_id','student_id');
- }
- public function scores()
- {
- return $this->belongsTo(Score::class, 'student_id','student_id');
- }
- public function work_experience()
- {
- return $this->belongsTo(Workexperience::class, 'student_id','student_id');
- }
- public function proposal()
- {
- return $this->belongsTo(Proposal::class, 'proposal_id','id');
- }
- public function work_experience_date()
- {
- return $this->hasMany(Workexperience::class, 'student_id','student_id');
- }
- public function country_name()
- {
- return $this->belongsTo(Country::class, 'nationality', 'id');
- }
- }
|