privateEquityFundAllData()->getData(); $openGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->privateEquityFund()->open()->active()->latest()->get(); $resaleGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->privateEquityFund()->resale()->active()->latest()->get(); $fullyFundedGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->privateEquityFund()->fullyFunded()->active()->latest()->get(); $learnMore = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswer()->getData(); // $faqs = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswerFaqs()->getData(); // dd($openGPEF); return view('Frontend.Pages.private-equity-funds.index', compact('privateEquity', 'learnMore', 'openGPEF', 'resaleGPEF', 'fullyFundedGPEF')); } public function globalPrivateEquityFundPage() { // $privateEquity = $this->privateEquityFundAllData()->getData(); $openGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->open()->active()->latest()->get(); $resaleGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->resale()->active()->latest()->get(); $fullyFundedGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get(); $learnMore = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswer()->getData(); // $faqs = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswerFaqs()->getData(); // dd($openGPEF); return view('Frontend.Pages.private-equity-funds.global-private-equity-fund', compact('learnMore', 'openGPEF', 'resaleGPEF', 'fullyFundedGPEF')); } public function product($slug = '') { $privateEquityFund = Fund::where('slug', $slug)->first(); $productData = Fund::where('slug', '=', $slug)->first(); $productData = Product::where('id', '=', $productData->products_id)->first(); // dd($privateEquityFund); return view('Frontend.Pages.private-equity-funds.product', compact('privateEquityFund', 'productData')); } public function privateEquityFundAllData($type = 'Open') { try { return (new test(Product::has('funds')->with('funds')->funds()->globalPrivateEquityFund()->where('type', $type)->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }