$data */ public static function fromArray(array $data): self { return new self( slug: $data['slug'], label: $data['label'], desc: $data['desc'] ?? null, image: $data['image'] ?? null, metaTitle: $data['meta_title'] ?? null, metaDescription: $data['meta_description'] ?? null, ); } /** * @return array */ public function toArray(): array { return [ 'slug' => $this->slug, 'label' => $this->label, 'desc' => $this->desc, 'image' => $this->image, 'meta_title' => $this->metaTitle, 'meta_description' => $this->metaDescription, ]; } }