diff --git a/app/Models/Forms/Form.php b/app/Models/Forms/Form.php index c2f2405..d3a61d5 100644 --- a/app/Models/Forms/Form.php +++ b/app/Models/Forms/Form.php @@ -153,6 +153,14 @@ class Form extends Model $this->attributes['submitted_text'] = Purify::clean($value); } + public function setTagsAttribute($value) + { + if ($value == null || $value == '') { + $value = '[]'; + } + $this->attributes['tags'] = json_encode($value); + } + public function getIsClosedAttribute() { return ($this->closes_at && now()->gt($this->closes_at));