public function postSearchRecipes(Request $request) { AlbertHeijn::setApiKey(env('API_KEY_ALBERTHEIJN')); $products = $request->json()->get('products'); $recipes = AlbertHeijn::searchRecipes($products); return response()->json($recipes); }
public function postGetRecipe(Request $request) { AlbertHeijn::setApiKey(env('API_KEY_ALBERTHEIJN')); $recipe = AlbertHeijn::getRecipe($request->input('id')); return response()->json($recipe); }