Set tags setter
This commit is contained in:
parent
35c49ff90c
commit
53272b033b
|
@ -153,6 +153,14 @@ class Form extends Model
|
||||||
$this->attributes['submitted_text'] = Purify::clean($value);
|
$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()
|
public function getIsClosedAttribute()
|
||||||
{
|
{
|
||||||
return ($this->closes_at && now()->gt($this->closes_at));
|
return ($this->closes_at && now()->gt($this->closes_at));
|
||||||
|
|
Loading…
Reference in New Issue