put('menu', 'member'); session()->put('title', 'Mitglieder'); return Inertia::render('member/VIndex', [ 'data' => MemberResource::collection(FilterScope::fromRequest($request->input('filter', ''))->getQuery()->query( fn ($q) => $q ->select('*') ->with(['gender', 'subscription', 'leaderMemberships', 'ageGroupMemberships.subactivity']) ->withPendingPayment() )->paginate(15)), ]); } public function store(MemberRequest $request, NamiSettings $settings): RedirectResponse { $request->persistCreate($settings); return redirect()->route('member.index'); } public function update(Member $member, MemberRequest $request): JsonResponse { try { $request->persistUpdate($member); } catch (ConflictException $e) { return response()->json([], 409); } return response()->json([]); } }