public function serialize() { if (!empty($this->site)) { return ['url' => $this->get('url'), 'product_id' => $this->get('product_id'), 'branch' => $this->get('branch'), 'status' => $this->getStatus()]; } return (array) $this->attributes; }