Prophet Muhammad led by example, digging the trench harder than anyone else. When Fatima cooked some bread and brought it to him, she learned that it was the first thing the prophet had eaten in three days.
During the digging, Imam Ali also dug relentlessly and the Prophet praised him saying "May my father be ransomed for the one who digs", highlights Imam Ali's high position in his the eyes. Prophet Muhammad never said this about any other companion.
When some companions uncovered a large rock that no one could move, Prophet Muhammad hit it with three miraculous strikes, shattering it.
At the end, Jabir ibn Abdullah al Ansari invited Prophet Muhammad to dinner. The prophet extended the invitation to the rest of the exhausted companions. Jabir worried the food would run short, but when the Prophet arrived at Jabir's home he blessed the food and there ended up being enough to feed every guest.
Lecture notes available at http://www.why-quran.org/?p=578.
Subscribe at http://www.why-quran.org/subscribe to watch the lectures live and participate in the Q&A at the end of each class.
Video recording of this lecture + Q&A available on YouTube at https://www.youtube.com/watch?v=pINIJqCUd_8&list=PLpkB0iwLgfTat-Pgh4W3WFmupPamiC9UT.