Theory, Fabrication, and Characterization of Perovskite Phototransistor