Smart hydrogel for cell housing in the brain and in the spinal cord