1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?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');
- }
- public function publications()
- {
- return $this->hasMany('App\Models\Publication', 'student_id','student_id');
- }
- }
|