attributes['time_answer'] = date('H:i:s', strtotime($value)); } else { $this->attributes['time_answer'] = null; } } public function getDefaultAnswerAttribute() { $value_type = getCustomFieldValueKey($this->type); return $this->$value_type; } public function company(): BelongsTo { return $this->belongsTo(Company::class); } public function customField(): BelongsTo { return $this->belongsTo(CustomField::class); } public function customFieldValuable(): MorphTo { return $this->morphTo(); } }