Summary
In this chapter, we have learned how Laminas deals with HTTP requests and responses. We also understood how a module works across the Laminas request life cycle.
With exercises, we learned how to implement CRUD with a controller and view pages. First, we understood the relationship between HTTP and PHP. This introduction was necessary for us to understand the next topic – that is, the request life cycle in the Laminas MVC.
After establishing the foundations, we started our TDD approach to implementing CRUD for products. So, we checked the state of the existing tests. Next, we created new tests for inserting, recovering, updating, and deleting products.
Once we were finished with the tests for CRUD, we created a controller class for exposing an API for product management. Next, we created a controller class for the user interface, which works in tandem with the API controller class. For this last controller, we implemented two pages, one for product editing and...