
上QQ阅读APP看书,第一时间看更新
Connecting with a database
As we saw previously, the controllers are activated by the routes and transmit information between the model/database and the view. In the preceding example, we used static content inside the view, but in larger applications, we will almost always have content coming from a database, or generated within the controller and passed to the view.
In the next example, we will see how to do this.