1234567891011121314151617181920212223242526272829303132 |
- <?php
-
- use Illuminate\Database\Eloquent\SoftDeletingTrait;
-
- class Criterion extends Eloquent
- {
- use SoftDeletingTrait;
- protected $dates = ['deleted_at'];
-
- protected $table = 'criteria';
-
- public function outcomes()
- {
- return $this->belongs('Outcome');
- }
-
- /**
- * Return the program that the criterion belongs to
- *
- * @return Illuminate\Database\Eloquent\Model
- */
- public function program()
- {
- return $this->belongsTo('Program');
- }
-
- public function subcriteria()
- {
- return json_decode($this->subcriteria);
- }
-
- }
|