ventureCapitalAllData()->getData(); $openGVCF = Product::has('funds')->with('funds.companies','categorys')->funds()->globalVentureCapitalFund()->open()->active()->latest()->get(); $resaleGVCF = Product::has('funds')->with('funds.companies','categorys')->funds()->globalVentureCapitalFund()->resale()->active()->latest()->get(); $fullyFundedGVCF = Product::has('funds')->with('funds.companies','categorys')->funds()->globalVentureCapitalFund()->fullyFunded()->active()->latest()->get(); $learnMore = (new FractionalRealEstateFrontendController)->globalVentureCapitalFundQuestionAndAnswer()->getData(); // $faqs = (new FractionalRealEstateFrontendController)->globalVentureCapitalFundQuestionAndAnswerFaqs()->getData(); // dd($openGVCF); return view('Frontend.Pages.venture-capital-funds.index',compact('ventureCapital','learnMore','openGVCF', 'resaleGVCF', 'fullyFundedGVCF')); } public function product($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 ventureCapitalAllData($type = 'Open') { try { return (new test(Product::has('funds')->with('funds','product_images')->where('type',$type)->funds()->globalVentureCapitalFund()->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }