The Prophet ﷺ passed by Bahrat ar-Ragha on his way to the siege of Ta'if, built a mosque there, and prayed in it before reaching Ta'if
In Shawwal of the year 8 after the Hijrah, while the Prophet ﷺ was traveling to the siege of Ta'if, he passed by Bahrat ar-Ragha, built a mosque there, then prayed in it before reaching Ta'if.

In Shawwal of the year 8 after the Hijrah, while the Prophet ﷺ was traveling to the siege of Ta'if, he passed by Bahrat ar-Ragha, built a mosque there, then prayed in it before reaching Ta'if.
It falls within the events of the Expedition of Ta'if in Year 8 after the Hijrah (8 AH), during the Prophet ﷺ's journey to Ta'if.
In Shawwal of this year: on the way - ﷺ - to the siege of Ta'if, he passed by Bahrat ar-Ragha and built a mosque there, and prayed in it before reaching Ta'if.

The Prophet ﷺ was on his way to Ta'if, so he stopped at a place called Bahrat ar-Ragha, built a mosque there, prayed in it, and then continued on to Ta'if.
The Prophet ﷺ was heading to Ta'if in the context of the Expedition of Ta'if after finishing at Hunayn and gathering the spoils at al-Ji'ranah.
Traveling to Ta'if as part of the Expedition of Ta'if, while taking a place to pray along the way.
The place became known for having a mosque in which the Prophet ﷺ prayed on his way to Ta'if.
Documenting a site passed by the Prophet ﷺ on his way to Ta'if, where he built a mosque.
Showing the Prophet ﷺ's care for prayer and for establishing places of prayer while traveling.
It took place in the context of the military movement toward Ta'if.
It links the main road with a known place of worship.
It teaches concern for prayer during travel.
Highlighting the Prophet ﷺ's effect in developing places through worship.
Part of the route of movement toward Ta'if in the Expedition of Ta'if.
He passed by the place, built a mosque, and prayed there.
Worship is not separate from movement and travel.
Being careful to pray on time and in the right place.
Turning a passing place into a place of worship.
Organized travel within the framework of the Expedition of Ta'if.
Teaching the Companions to care about prayer on the road.
Establishing a place for prayer along the route of movement.
Linking civilization with worship
Being busy with travel or work until prayer is missed or its presence grows weak.
Making sure places for prayer are prepared while traveling.
Caring for prayer areas for travelers and along roads.
Providing places of worship along travel routes.
Taking the initiative to pray and not delay it.
It is limited to the meaning of caring for prayer while traveling, without extending the analogy too far.
The Prophetic context was during a campaign journey, while the modern one is in civil travel or transport.
Make prayer present in every journey or trip.