$this->themaService->getAll(), ]); } public function store(Request $request) { $validated = $request->validate([ 'naam' => 'required|string|max:255', 'beschrijving' => 'nullable|string', 'prioriteit' => 'nullable|string', 'periode_start' => 'nullable|date', 'periode_eind' => 'nullable|date|after:periode_start', ]); $this->themaService->create($validated); return back()->with('success', 'Thema aangemaakt.'); } public function update(Request $request, Thema $thema) { $validated = $request->validate([ 'naam' => 'sometimes|string|max:255', 'beschrijving' => 'nullable|string', 'prioriteit' => 'nullable|string', 'periode_start' => 'nullable|date', 'periode_eind' => 'nullable|date', ]); $this->themaService->update($thema, $validated); return back()->with('success', 'Thema bijgewerkt.'); } }