Sin descripción

12345678910111213141516171819202122232425262728
  1. <?php
  2. class FypPart extends \Eloquent {
  3. protected $fillable = ['five_year_plan_id', 'year_start', 'year_end'];
  4. // return all the outcomes in the the five year part plan
  5. public function fypPartOutcomes()
  6. {
  7. return $this->hasMany('FypPartOutcome');
  8. }
  9. public function willAssessOutcome($outcome_id)
  10. {
  11. $q = FypPartOutcome::
  12. where('fyp_part_id', $this->id)
  13. ->where('outcome_id', $outcome_id)
  14. ->first();
  15. if($q)
  16. {
  17. return true;
  18. }
  19. else
  20. {
  21. return false;
  22. }
  23. }
  24. }