The Lord was with Joseph in Egypt and blessed all that he did.
The Lord was with Joseph, and he was a successful man; and he was in the house of his master the Egyptian. And his master saw that the Lord was with him and that the Lord made all he did to prosper in his hand. So Joseph found favor in his sight, and served him. Then he made him overseer of his house, and all that he had he put under his authority. (Genesis 39:2-4 NKJV)
It is amazing that Joseph’s master, an Egyptian, knew that the Lord was with Joseph. He even gave Joseph authority over what he had. Eventually, the master’s wife tricks him into thinking that Joseph wanted to lie with her, which he did not. The master is angry and sends him to prison.
Even the keeper of the prison sees that the Lord is with Joseph and puts Joseph in charge of the prisoners.
But the Lord was with Joseph and showed him mercy, and He gave him favor in the sight of the keeper of the prison. And the keeper of the prison committed to Joseph’s hand all the prisoners who were in the prison; whatever they did there, it was his doing. (Genesis 39:21, 22 NKJV)