Don't worry about the turret near the entrance. Just walk past before it can start shooting. Since it's in the wall, it can't see you after you go past.
Up ahead, there are a bunch of turrets behind glass. The big button that you can reach will activate a laser from the ceiling. Beyond the glass, you can see a weighted cube and a laser redirection cube.
Create a portal on the wall where the turrets are aiming. Then create a portal on the floor below the ceiling laser. The ceiling laser will go through and destroy the turrets.
After those turrets are gone, you can go over to the cubes. You'll notice that the other turrets are behind glass and you can't currently reach them. There is a laser receptacle near the exit. Fortunately, lasers can go through glass.
So go put the cube on the big button to activate the laser. Now make sure that the laser is going through the portal like it was when you used it to destroy the turrets earlier. Put the redirection cube in the path of the laser to aim the laser. Use it to destroy the remaining turrets and make the laser go into the receptacle on the wall next to the exit door. Doing so will cause the nearby barrier to go away, allowing you to reach the exit.