validated(); $connector = new SpoonacularConnector(); $request = new FindRecipesByIngredients( ingredients: array_map("trim", explode(",", $data['ingredients'])), ranking: 2 ); $response = $connector->send($request); return Inertia::render('Search/Recipes', [ 'recipes' => $response->json(), 'previousSearch' => $data['ingredients'] ]); } }