The Prophet’s (saas) trust in Allah

Those situations the Prophet (saas) was involved, as they are related in the Qur'an, demonstrate his resignation, and submission to Allah. For instance, the Prophet (saas)'s words when he and his friend were hiding in a cave after leaving Mecca are one of the finest examples of that submission. In the Qur'an, Allah says:

If you do not help him, Allah did help him when those who disbelieved drove him out and there were two of them in the Cave. He said to his companion, "Do not be despondent, Allah is with us." Then Allah sent down His serenity upon him and reinforced him with troops you could not see. He made the word of those who disbelieved undermost. It is the word of Allah which is uppermost. Allah is Almighty, All-Wise. (Surat at-Tawba: 40)

Whatever the situation might have been, the Prophet (saas) always submitted to Allah, in the knowledge that there was beauty and goodness in all that He created. These words of the Prophet (saas) to his people as related in the Qur'an are a telling instance of that submission:

If good happens to you it galls them. If a mishap occurs to you, they say, "We made our preparations in advance," and they turn away rejoicing. Say: "Nothing can happen to us except what Allah has ordained for us. He is Our Master. It is in Allah that the believers should put their trust." (Surat at-Tawba: 50-51)

The Prophet (saas), by his submission to Allah, was an example to all Muslims, and he warned that people would never have the power to alter anything that came from Allah:

"Everything is by decree—even incapacity and ability" 1
"… When you ask for anything ask it from Allah, and if you seek help in Allah. Know that if the people were to unite to do you some benefit they could benefit you only with what Allah had recorded for you, and that if they were to unite to do you some injury they could injure you only with what Allah had recorded for you. The pens are withdrawn and the pages are dry." 2

Every believer who abides by the Sunnah of the Prophet (saas) has to face every calamity with the same submission as he, and to have faith that there is beauty and good in everything. We must not forget that the Prophet Muhammad (saas), one of Allah's most God-fearing servants, was also tested with great difficulties and trying circumstances.
There were people ready to create various kinds of difficulty in the communities he addressed. They tried to plot against the Prophet (saas) by behaving hypocritically. Polytheists refused to abandon the religion of their ancestors, others asked the Prophet (saas) to bring them a sign to suit their best interests, they tried to kill, arrest or exile the Prophet (saas), and, basically, placed all kinds of difficulties in his path.
The Prophet (saas) was always patient with the unbelievers. He continued to communicate the religion of Allah and to instruct Muslims in the Qur'an while he protected them from danger. The source of that determination, success and courage lay his strong faith in Allah, his godliness and submission. The Prophet (saas) always knew that Allah was with him, as when he was in the cave, and that every situation was ordained by Allah. He had faith that everything came from Allah and would result in the best possible outcome. The following hadith of the Prophet (saas) is an example of his submission:

"Strange are the ways of a believer for there is good in every affair of his and this is not the case with anyone else except in the case of a believer for if he has an occasion to feel delight he thanks [Allah], thus there is a good for him in it, and if he gets into trouble and shown resignation (and endures it patiently), there is a good for him in it." 3

The Prophet (saas) always did his best, whatever the situation, though knowing that the outcome depended on Allah. He relied on and trusted in Him. In return for that submission, Allah granted him strength and success.
Allah instructed the Prophet (saas) to be patient in the face of those who made problems for him, and he was faithful to that prescription throughout his life. Ine one verse Allah says:

They have the word, "Obedience!" on their tongues but when they leave your presence, a group of them spend the night plotting to do other than what you say. Allah is recording their nocturnal plotting. So let them be and put your trust in Allah. Allah suffices as a Guardian. (Surat an-Nisa': 81)

The words the Prophet (saas) was commanded to say in another trying situation also reveal his godliness and submission:

If they argue with you, say, "I have submitted myself completely to Allah, and so have all who follow me." Say to those given the Book and those who have no Book, "Have you become Muslim?" If they become Muslim, they have been guided. If they turn away, you are only responsible for transmission. Allah sees His servants. (Surah Al ‘Imran: 20)

One comment by the Prophet (saas) regarding the recompense awaiting those who demonstrate submission is as follows:

"If you put your faith completely in Allah, He will arrange for your sustenance in the same way as He provides for the birds. They go out in the morning with their stomachs empty and return filled in the evening." 4

The Prophet (saas)'s words and actions are the best possible models for believers. That is why every believer who finds himself faced with a difficulty of any sort, or a situation he does not like, must think of the verses of the Qur'an and the fact that Allah creates everything; adopt the submission of the Prophet (saas) and accept the destiny chosen for him by Allah. (For further reading about the attributes of the Prophet (saas), see “The Prophet Muhammad (saas)” by Harun Yahya)
1. Malik's Muwatta, Book 46, Number 4
2. Tirmidhi Hadith
3. Sahih Muslim, Book 41, Number 7138
4. Tirmidhi Hadith, Number 20