This tutorial will take you step by step on how to create a simple rest API using the Laravel framework. To prepare your windows computer for building Laravel applications, you will need to install PHP and composer. One quick way to get PHP along with MySQL which you will need for data persistence is to install it via XAMPP. Here is the link to download and install XAMPP. Next download and install composer, which is a PHP dependency manager. If you use an operating system other than windows, you can follow environment setup instructions here
Confirm that your PHP installation is OK
Confirm that your Composer installation is ready
Now that we've gotten the pre-requisites out of the way. Let's create the Laravel project. Navigate to your preferred project location via the command prompt. Mine is C:\Projects and there execute the following instruction Laravel new contacts-api. Laravel will create a new directory called contacts-api and download all the required components for a starter Laravel project.
You can verify that your brand new Laravel app is functional by changing directory into the contacts-api folder and executing php artisan serve. You should see the following output
And if you point your browser to localhost:8000 you will see the default content for a fresh laravel 8 application
In part 2 of this series, we will use a TDD approach to commence the actual creation of the contacts feature of this application.