Posts

Showing posts from September, 2022

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

Angular, PHP & Mysql

Image
Angular is one of the famous frameworks to build rich and user-friendly front-end apps. It is based on TypeScript that is extended from JavaScript. Angular currently backed by a giant company - Google has a large community of passionate web developers. Angular was built around the concept of resuable components and a collection of libraries to build scalable web applications. Angular uses two-way data binding. Data changed in UI or view (html) reflect changes in state data of a component and vice versa. You will learn to build a simple full stack web application - Product Admin with Angular, PHP, and Mysql. We build front-end app with Angular and back-end APIs with PHP and Mysql. The sample project allows a visitor to register and login. An authorized user will be able to list products, insert, update, and delete products. You find the demo of the project here: Product Admin with Angular, PHP, and Mysql Before we start, check if you have installed NPM (Node Package Manager), and