hasMany('FypPart'); } // return all the outcomes in the plan public function outcomes() { return $this->hasManyThrough('FypPartOutcome', 'FypPart'); } // return the quinquennium the five year plan belongs to public function quinquennium() { return $this->belongsTo('Quinquennium'); } // return the program the plan belongs to public function program() { return $this->belongsTo('Program'); } }