/laravelapi

A repo to learn how to create api in laravel

Primary LanguagePHP


Laravel API

A kickstart project to learn on how to create api in Laravel CakePHP framework.

Built With

  • Laravel

(back to top)

Getting Started

To set up this project locally, you can follow the guideline below:

Prerequisites

Please install the software listed below.

  • Laragon

Installation

  1. Clone the repo into C:/Laragon/WWW folder
    git clone https://github.com/nasuhasri/laravelapi.git
  2. Copy and paste env.example file in the same destination.
  3. Change the file to be .env only.
  4. Rename your database to any name you want.
  5. To make it easy, you can rename the database to laravelapi.
  6. Create the database in laragon using the same name.
  7. Import the laravelapi.sql file in database in the laragon.
  8. Copy and paste this link http://localhost/laravelapi/public/api/listAll to access the api.
  9. You should get the interface as below.

Laravel API Screen Shot

  1. To get the list of api in this project, you can go to routes/api.php or you can simply type this command in your terminal:
    public artisan route:list
  2. You should get interface as below:

Laravel API Route Screen Shot

(back to top)