hedgeFundAllData()->getData(); $openGHF = Product::has('funds')->with('funds','categorys')->globalHedgeFund()->open()->active()->latest()->get(); $resaleGHF = Product::has('funds')->with('funds','categorys')->globalHedgeFund()->resale()->active()->latest()->get(); $fullyFundedGHF = Product::has('funds')->with('funds','categorys')->globalHedgeFund()->fullyFunded()->active()->latest()->get(); $learnMore = (new FractionalRealEstateFrontendController)->globalHedgeFundQuestionAndAnswer()->getData(); // $faqs = (new FractionalRealEstateFrontendController)->globalHedgeFundQuestionAndAnswerFaqs()->getData(); // dd($openGHF); return view('Frontend.Pages.hedge-funds.index',compact('hedgeFunds','learnMore','openGHF','resaleGHF','fullyFundedGHF')); } public function product($slug = '') { $hedgeFund = Fund::where('slug',$slug)->first(); $productData = Fund::where('slug','=',$slug)->first(); $productData = Product::where('id','=',$productData->products_id)->first(); // dd($hedgeFund); return view('Frontend.Pages.hedge-funds.product',compact('hedgeFund','productData')); } public function hedgeFundAllData() { try { return (new test(Product::has('funds')->with('funds')->funds()->globalHedgeFund()->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }