説明なし

Criterion.php 528B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. use Illuminate\Database\Eloquent\SoftDeletingTrait;
  3. class Criterion extends Eloquent
  4. {
  5. use SoftDeletingTrait;
  6. protected $dates = ['deleted_at'];
  7. protected $table = 'criteria';
  8. public function outcomes()
  9. {
  10. return $this->belongs('Outcome');
  11. }
  12. /**
  13. * Return the program that the criterion belongs to
  14. *
  15. * @return Illuminate\Database\Eloquent\Model
  16. */
  17. public function program()
  18. {
  19. return $this->belongsTo('Program');
  20. }
  21. public function subcriteria()
  22. {
  23. return json_decode($this->subcriteria);
  24. }
  25. }