Laravel Logo

Build Status Total Downloads Latest Stable Version License

About This API

This API is created using Laravel 9.19 API Resource. It has Users, Product. Protected routes are also added. Protected routes with Laravel Sanctum.

Following are the Models

  • User
  • Product

Usage

Clone the project via git clone or download the zip file.

.env

Copy contents of .env.example file to .env file. Create a database and connect your database in .env file.

Composer Install

cd into the project directory via terminal and run the following command to install composer packages.

   $ composer install

Run Migration

then run the following command to create migrations in the databbase.

   $ php artisan migrate

Run App

   $ php artisan serve

Test Api in your Postmant

in the folder "postman" has file "mock-test-binar.postman_collection.json". import the file to your postman

API EndPoints

Auth
Product

Screen Capture Postman Result

Register

register

Login

login

Get All Products

Get All Products

Get Detailed Product By Id

Get Detail Product

Create Product

Create Product

Update Product By Id

Update Product

Delete Product By Id

Delete Product

Logout

logout

Test Api in Swagger

Jawaban Mock Test

Jawaban Mock Test