mutualFundAllData()->getData(); $learnMore = (new FractionalRealEstateFrontendController)->mutualFundsQuestionAndAnswer()->getData(); $faqs = (new FractionalRealEstateFrontendController)->mutualFundsQuestionAndAnswerFaqs()->getData(); return view('Frontend.Pages.mutual-funds.index',compact('mutualFund','learnMore','faqs')); } public function product($slug = '') { $mutualFund = Fund::where('slug',$slug)->first(); $productData = Fund::where('slug','=',$slug)->first(); $productData = Product::where('id','=',$productData->products_id)->first(); return view('Frontend.Pages.mutual-funds.product',compact('mutualFund','productData')); } public function mutualFundAllData() { try { return (new test(Product::has('funds')->with('funds')->funds()->mutualFund()->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } public function fundData($slug) { try { return (new GlobalFundResource(Fund::where('slug', $slug)->first())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }