public function obtenerHospital($idHospital) { $doctorM = new doctorModel(); $servicioM = new servicioModel(); $hospital = $this->find($idHospital); $hospital->srcImage = $this->isImageHere($hospital); $hospital->services = $this->servicioByHospital($idHospital); // $hospital->doctors = json_decode($doctorM->directorioMedico($idHospital),2);//TODO $hospital->doctors = json_decode($doctorM->listarDoctoresLimit(50, 0, $hospital->catSiglas), 2); //TODO $request = (object) []; //declaro un objeto vacio $request->rows = 50; $request->limit = 0; $request->hospital = $idHospital; $hospital->servicios = json_decode($servicioM->listarServiciosLimit($request), 2); // echo '<pre>';print_r($hospital->servicios['disabled']);exit; $hospital->products = $this->productoByHospital($idHospital); $hospital->especialidades = $this->especialidadByHospital($idHospital); return $hospital; }
public function listarServiciosLimit(Request $request) { $servicio = new servicioModel(); $serviciotable = $servicio->listarServiciosLimit($request); return $serviciotable; }