*/ public function toArray($request) { return [ 'name' => $this->name, 'from_human' => $this->from?->format('d.m.Y'), 'to_human' => $this->to?->format('d.m.Y'), 'from' => $this->from?->format('Y-m-d'), 'to' => $this->to?->format('Y-m-d'), 'excerpt' => $this->excerpt, 'description' => $this->description, 'mail_top' => $this->mail_top, 'mail_bottom' => $this->mail_bottom, 'registration_from' => $this->registration_from?->format('Y-m-d H:i:s'), 'registration_until' => $this->registration_until?->format('Y-m-d H:i:s'), ]; } }