gre = $gre; } public function index(){ return view('Frontend.Pages.global-real-estate.index'); } public function industrial(){ // dd($this->gre->openGIRE()->getData()); return view('Frontend.Pages.global-real-estate.industrial',[ 'openGIRE' => $this->gre->openGIRE()->getData(), 'fullyFundedGIRE' => $this->gre->fullyFundedGIRE()->getData(), 'resaleGIRE' => $this->gre->resaleGIRE()->getData(), 'learnMore' => $this->gre->globalIndustrialRealEstateLearnMore()->getData() ]); } public function residential(){ // dd($this->gre->openGRRE()->getData()); return view('Frontend.Pages.global-real-estate.residential',[ 'openGRRE' => $this->gre->openGRRE()->getData(), 'fullyFundedGRRE' => $this->gre->fullyFundedGRRE()->getData(), 'resaleGRRE' => $this->gre->resaleGRRE()->getData(), 'learnMore' => $this->gre->globalResidentialRealEstateLearnMore()->getData() ]); } public function commercial(){ // dd($this->gre->openGCRE()->getData()); return view('Frontend.Pages.global-real-estate.commercial',[ 'openGCRE' => $this->gre->openGCRE()->getData(), 'fullyFundedGCRE' => $this->gre->fullyFundedGCRE()->getData(), 'resaleGCRE' => $this->gre->resaleGCRE()->getData(), 'learnMore' => $this->gre->globalCommercialRealEstateLearnMore()->getData() ]); } public function globalIndustrialRealEstateAllData($type = 'Open') { try { return (new test(Product::has('realEstate')->with('realEstate.photo')->globalIndustrialRealEstate()->where('type',$type)->active()->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } public function globalResidentialRealEstateAllData($type = 'Open') { try { return (new test(Product::has('realEstate')->with('realEstate.photo')->globalResidentialRealEstate()->where('type',$type)->active()->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } public function globalCommercialRealEstateAllData($type = 'Open') { try { return (new test(Product::has('realEstate')->with('realEstate.photo')->globalCommercialRealEstate()->where('type',$type)->active()->get())) ->response() ->setStatusCode(200); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }