validate([ 'user_id' => ['required', 'integer', 'exists:users,id'], 'algo_version' => ['nullable', 'string', 'max:64'], ]); $userId = (int) $validated['user_id']; $algoVersion = isset($validated['algo_version']) ? (string) $validated['algo_version'] : null; return response()->json([ 'meta' => [ 'generated_at' => now()->toISOString(), ], 'decision' => $this->feedResolver->inspectDecision($userId, $algoVersion), ], Response::HTTP_OK); } }