Generating a form for discounts with laminas-form
In this chapter, we will use three new Laminas components. The first is laminas-form
, used to define HTML forms. In the same way you added and installed the laminas-db
component using Composer, do the same for the laminas-form
component:
- Open the
composer.json
file in Eclipse. - Through the Dependencies tab, search for the
laminas/laminas-form
package and add it. - Save the file and click on the Update dependencies button.
If you have any doubts about how to install Composer dependencies with Eclipse, read the Creating our first automated test section of Chapter 3, Using Laminas as a Library with Test-Driven Development.
Important note: Component injection into configuration
When you install a Laminas component in an MVC Laminas project with Composer, you will be asked about the injection of a component into configuration. When Composer asks this, you must select the option to inject into the config/modules...