exchangeTradedFundsAllData()->getData(); $openGETF = Product::has('exchanges')->with('exchanges','categorys')->exchangeTradedFund()->open()->active()->latest()->get(); $resaleGETF = Product::has('exchanges')->with('exchanges','categorys')->exchangeTradedFund()->resale()->active()->latest()->get(); $fullyFundedGETF = Product::has('exchanges')->with('exchanges','categorys')->exchangeTradedFund()->fullyFunded()->active()->latest()->get(); $learnMore = (new FractionalRealEstateFrontendController)->exchangeTradedFundsQuestionAndAnswer()->getData(); // $faqs = (new FractionalRealEstateFrontendController)->exchangeTradedFundsQuestionAndAnswerFaqs()->getData(); // dd($openGETF); return view('Frontend.Pages.etfs.index',compact('etfs','learnMore', 'openGETF', 'resaleGETF', 'fullyFundedGETF')); } public function product($slug = ''){ $etf = StockFundsRealEstateExchange::where('slug',$slug)->first(); $productData = StockFundsRealEstateExchange::where('slug','=',$slug)->first(); $productData = Product::where('id','=',$productData->products_id)->first(); // dd($etf); return view('Frontend.Pages.etfs.product',compact('etf','productData')); } public function exchangeTradedFundsAllData($type = 'Open') { try { return (new test(Product::has('exchanges')->with('exchanges')->exchangeTradedFund()->where('type',$type)->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }