public function getExtraAttribute($value) { if (!empty($value)) { return new ExtraParams($value); } return new ExtraParams([]); }