The first step in building the application is to make sure that the underlying programming driver infrastructure is in place. This has already been covered in detail in Chapter 4, Developing with Program Language Drivers. Here is a brief overview of the steps to take:
- Install PHP X.Y and the phpX.Y-dev library, where X.Y is the target version (for example, PHP 7.2)
- Install PECL by installing php-pear
- Install the PHP mongodb extension using pecl
- Install the PHP MongoDB Library using the composer require mongodb/mongodb command
Once the programming language driver infrastructure is in place, we can turn our attention to application development. The objective in this illustration is to provide a way to view and add purchases using the sweetscomplete database. To refresh your memory, the purchases document appears as follows:
We will first turn our attention...