12345678910111213141516171819202122 |
- <?php
-
- class Student extends Eloquent
- {
- protected $fillable = array('name', 'number', 'email', 'school_code', 'conc_code');
-
- public function courses()
- {
- return $this->belongsToMany('Course')->withTimestamps();
- }
-
- public function program()
- {
- return $this->belongsTo('Program');
- }
-
- public function assessed_activities()
- {
- //return $this->belongsToMany('Activity', 'assessments')->withPivot('scores', 'percentage')->withTimestamps();
- return $this->belongsToMany('Activity', 'assessments')->withPivot('scores')->withTimestamps();
- }
- }
|