Geen omschrijving

FiveYearPlan.php 646B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. class FiveYearPlan extends \Eloquent {
  3. protected $fillable = ['program_id', 'quinquennium_id', 'is_submitted', 'submitted_on'];
  4. // return all the parts in the five year plan
  5. public function fypParts()
  6. {
  7. return $this->hasMany('FypPart');
  8. }
  9. // return all the outcomes in the plan
  10. public function outcomes()
  11. {
  12. return $this->hasManyThrough('FypPartOutcome', 'FypPart');
  13. }
  14. // return the quinquennium the five year plan belongs to
  15. public function quinquennium()
  16. {
  17. return $this->belongsTo('Quinquennium');
  18. }
  19. // return the program the plan belongs to
  20. public function program()
  21. {
  22. return $this->belongsTo('Program');
  23. }
  24. }