Ei kuvausta

Outcome.php 516B

1234567891011121314151617181920212223242526
  1. <?php
  2. use Illuminate\Database\Eloquent\SoftDeletingTrait;
  3. class Outcome extends Eloquent
  4. {
  5. use SoftDeletingTrait;
  6. protected $dates = ['deleted_at'];
  7. protected $fillable= array('name', 'definition');
  8. public function criteria()
  9. {
  10. return $this->hasMany('Criterion')->orderBy('name');
  11. }
  12. /**
  13. * Return the objectives that the outcome belongs to
  14. *
  15. * @return Illuminate\Database\Eloquent\Model
  16. */
  17. public function objectives()
  18. {
  19. return $this->belongsToMany('Objective', 'objective_outcome');
  20. }
  21. }