belongsTo('App\ShippingGroup'); } public function getExceptionsAttribute() { return json_decode($this->attributes['exceptions']); } public function setExceptionsAttribute($value) { if ($value !== null) { $this->attributes['exceptions'] = json_encode($value, JSON_UNESCAPED_UNICODE); } else { $this->attributes['exceptions'] = null; } } }