Yes, you can apply for PR in Germany. Anyone who has managed to live in Germany for at least five years can apply for a PR permit in Germany. You can live in Germany on the basis of your work permit. Also, you can get it extended, and once you have completed five years in the country, you can apply for a PR visa.