with('funds')->funds()->globalPrivateCreditFund()->open()->active()->latest()->get()); $learnMore = (new FractionalRealEstateFrontendController)->globalPCFQuestionAndAnswer()->getData(); return view('Frontend.Pages.dummy.global-private-credit', [ 'learnMore' => $learnMore, 'openGPCF' => Product::has('funds')->with('funds')->funds()->globalPrivateCreditFund()->open()->active()->latest()->get(), // 'resaleGPCF' => Product::has('alternativeInvestmentFund')->with('alternativeInvestmentFund.companies', 'categorys')->globalPrivateCreditFund()->resale()->active()->latest()->get(), 'resaleGPCF' => Product::has('funds')->with('funds')->funds()->globalPrivateCreditFund()->resale()->active()->latest()->get(), ]); } public function getGlobalPrivateCreditFundProduct($slug) { $ventureCapitalFund = Fund::where('slug', $slug)->first(); $productData = Fund::where('slug', '=', $slug)->first(); $productData = Product::where('id', '=', $productData->products_id)->first(); // dd($ventureCapitalFund); return view('Frontend.Pages.venture-capital-funds.product', compact('ventureCapitalFund', 'productData')); } public function privateCreditAllData($type = 'Open') { try { return (new test(Product::has('funds')->with('funds','product_images')->where('type', $type)->funds()->globalPrivateCreditFunds()->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }