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

You can verify your readiness to build a Laravel application by running the following tests at the windows command prompt or windows terminal

Confirm that your PHP installation is OK

Your PHP installation is good to go if the php --version command output looks like this
Your PHP installation is good to go if the php --version command output looks like this

Confirm that your Composer installation is ready

Composer ready to roar (use)
Composer ready to roar (use)

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.

Initial output of laravel new contacts-api (project scaffolding in progress)
Initial output of laravel new contacts-api (project scaffolding in progress)
Terminal output of the new project creation command
Terminal output of the new project creation command

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

Your laravel app is up and running and can be accessed on port 8000
Your laravel app is up and running and can be accessed on port 8000

And if you point your browser to localhost:8000 you will see the default content for a fresh laravel 8 application

Home page of a virgin laravel app
Home page of a virgin laravel app

In part 2 of this series, we will use a TDD approach to commence the actual creation of the contacts feature of this application.