*/ public function toArray(Request $request): array { /* @var Election $this */ return [ 'id' => $this->id, 'title' => $this->title, 'subtitle' => $this->subtitle, 'type' => $this->type->getLabel(), 'is_live' => $this->is_live, 'slug' => $this->slug, ]; } }