No Description

Objective.php 787B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. class Objective extends Eloquent
  3. {
  4. protected $fillable = array('text', 'outcome_id', 'program_id', 'active');
  5. /**
  6. * Return the program that the objective belongs to
  7. *
  8. * @return Illuminate\Database\Eloquent\Model
  9. */
  10. public function program()
  11. {
  12. return $this->belongsTo('Program');
  13. }
  14. /**
  15. * Return the outcomes that the objective belongs to
  16. *
  17. * @return Illuminate\Database\Eloquent\Model
  18. */
  19. public function outcomes()
  20. {
  21. return $this->belongsToMany('Outcome', 'objective_outcome', 'objective_id', 'outcome_id');
  22. }
  23. /**
  24. * Return the program that the objective belongs to
  25. *
  26. * @return Illuminate\Database\Eloquent\Model
  27. */
  28. public function criteria()
  29. {
  30. return $this->hasMany('Criterion');
  31. }
  32. }