Няма описание

12345678910111213141516171819202122232425262728
  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. }