eventName, dateFrom: $request->dateFrom, dateUntil: $request->dateUntil, members: $request->members, ); } public function checkboxes(): string { $output = ''; $firstRow = collect(['B' => 'Jugendbildungsmaßnahme', 'G' => 'Gruppenleiter/innenschulung', 'FK' => 'Ferienkolonie', 'F' => 'Freizeitnaßnahme'])->map(function ($item, $key) { return ($this->type === $key ? '\\checkedcheckbox' : '\\checkbox').'{'.$item.'}'; })->implode(' & ').' \\\\'; $secondRow = collect(['I' => 'Int. Jugendbegegnung', 'P' => 'politische Jugendbildung', 'PR' => 'Projekte'])->map(function ($item, $key) { return ($this->type === $key ? '\\checkedcheckbox' : '\\checkbox').'{'.$item.'}'; })->implode(' & ').' & \\emptycheckbox \\\\'; return $firstRow."\n".$secondRow; } public function members(): Collection { return Member::whereIn('id', $this->members)->orderByRaw('lastname, firstname')->get(); } public function niceEventFrom(): string { return Carbon::parse($this->dateFrom)->format('d.m.Y'); } public function niceEventTo(): string { return Carbon::parse($this->dateUntil)->format('d.m.Y'); } public function getFilename(): string { return 'zuschuesse-solingen-'.Str::slug($this->eventName); } public function getView(): string { return 'tex.zuschuss-stadt'; } public function getTemplate(): ?string { return null; } public function setFilename(string $filename): static { $this->filename = $filename; return $this; } public function getScript(): EnvType { return EnvType::PDFLATEX; } }