Decodes meta option field if it exists on the object

This commit is contained in:
Vlad
2018-04-29 21:24:49 -04:00
parent 08fa5b88b5
commit e578b0a4ea
2 changed files with 43 additions and 5 deletions

View File

@@ -975,4 +975,10 @@ class Newsletter extends Model {
return parent::where('hash', $hash)
->findOne();
}
function getMeta() {
if(!$this->meta) return;
return (Helpers::isJson($this->meta)) ? json_decode($this->meta, true) : $this->meta;
}
}