Inside the MVC framework, the Controllers, Models, and Views need to work together to form the HTTP request and response cycle. The fundamental starting point, however, is calling the correct Controller based on the HTTP request it receives. Without that, our application built on the MVC framework can't work. In the MVC framework, the process of calling the correct Controller for the HTTP request is known as routing.
Creating Controllers and using routing
Getting ready
We can route HTTP requests to the correct Controllers by looking at what routing information is contained in the middleware of our application. The middleware then uses this routing information to see if the HTTP request needs to get sent to a Controller or not. Middleware will have a look at...