It's in the Holy Scriptures... It reads this way. Psalm 92:13 ~ They are planted in Yahweh's house. They will flourish in our God's courts., (World English Bible).
It's also a concept taken from Psalm 1:3, (♪ ♫ and a Song ~ Just Like a Tree planted by the waters, I shall not be moved ♫ ♪). Psalm 1:3 - ~ And he shall be like a tree planted by the rivers of water, that brings forth his fruit in his season; his leaf also shall not wither; and whatsoever he doeth shall prosper.
See also Jeremiah 17:7-8 ~ Blessed is the man who trusts in Yahweh, and whose trust Yahweh is. For he shall be as a tree planted by the waters, who spreads out its roots by the river, and shall not fear when heat comes, but its leaf shall be green; and shall not be careful in the year of drought, neither shall cease from yielding fruit.
And this was proven true with Isaac when God told him not to leave Gerar. You can read the whole story in Genesis 26:1-17 where Isaac never left Gerar even in the midst of a Famine, and increased 100-fold, and didn't even leave Gerar when the King told him to depart from him, (because he was so wealthy that he made the King look bad), or you might be able to copy and paste this link.
Also, in the New Testament ~ (Look at 1 Corinthians 12:18 ~ But now God has set the members, each one of them, in the body, just as he desired).