1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
-
- class Objective extends Eloquent
- {
-
- protected $fillable = array('text', 'outcome_id', 'program_id', 'active');
-
- /**
- * Return the program that the objective belongs to
- *
- * @return Illuminate\Database\Eloquent\Model
- */
- public function program()
- {
- return $this->belongsTo('Program');
- }
-
- /**
- * Return the outcomes that the objective belongs to
- *
- * @return Illuminate\Database\Eloquent\Model
- */
- public function outcomes()
- {
- return $this->belongsToMany('Outcome', 'objective_outcome', 'objective_id', 'outcome_id');
- }
-
- /**
- * Return the program that the objective belongs to
- *
- * @return Illuminate\Database\Eloquent\Model
- */
- public function criteria()
- {
- return $this->hasMany('Criterion');
- }
-
- }
|