| Total Complexity | 3 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class Question extends Model |
||
| 13 | { |
||
| 14 | |||
| 15 | use SoftDeletes; |
||
| 16 | use EloquentGetTableName; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * The attributes that should be mutated to dates. |
||
| 20 | * |
||
| 21 | * @var array |
||
| 22 | */ |
||
| 23 | protected $dates = ["deleted_at"]; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The attributes that should be cast to native types. |
||
| 27 | * |
||
| 28 | * @var array |
||
| 29 | */ |
||
| 30 | protected $casts = ["required" => "boolean"]; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Get the possible answers of this question |
||
| 34 | * @return HasMany |
||
| 35 | */ |
||
| 36 | public function answers() : HasMany |
||
| 37 | { |
||
| 38 | return $this->hasMany("App\Models\Answer"); |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get the section of this question |
||
| 43 | * @return BelongsTo |
||
| 44 | */ |
||
| 45 | public function section() : BelongsTo |
||
| 46 | { |
||
| 47 | return $this->belongsTo("App\Models\Section"); |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getOptionsAttribute() |
||
| 53 | } |
||
| 54 | |||
| 55 | } |
||
| 56 |