PHP Routing & Restful API
In this tutorial, we are going to create restful APIs with PHP. The APIs will be accessed by Angular app to fetch products, add, update and delete products from Mysql database. Now you have to install Composer on your local development machine. Composer is a very helpful tool to manage dependencies in PHP. Here is where you can download Composer: https://getcomposer.org/. Again, if you haven't installed NPM, VSC editor, and XAMPP, visit the Angular & PHP for download links. In the xampp/htdocs folder of XAMPP, create a folder named mysite . In the mysite folder, create another folder named api. In the api folder, create composer.json file. { "name": "php_api", "description": "PHP APIs", "autoload": { "psr-4": { "App\\": "app/" } } } This configuration allows you to use App name while namespacing the files instead of app directory. For example...