clone the repository to your machine.
open the directory of project and install the dependencies via "composer install".
make database connections on .env file.
make migrations via "php artisan migrate".
install Laravel passport via "php artisan passport:install".
start the application with "php artisan serve".
User registration:___ "/api/register"
User Login:___ "/api/login"
User Logout:___ "/api/logout"
Get all products:___ "/api/products"
Get all products of a category:___ "/api/products/{category_id}"
Get single product by id:___ "/api/single-product/{id}"
Get all categories:___ "/api/categories"
Get single category by id:___ "/categories/{id}"
Add new product:___ "/api/add-product"
Add multiple products(for bulk operations):___ "/api/add-products"
Update a product:___ "/api/update-product/{id}"
Delete a product:___ "/api/delete-product/{id}"
Add new category:___ "/api/add-category"
Update a category:___ "/api/update-category/{id}"
Delete a category:___ "/api/delete-category/{id}"
{ "name": "John Doe", "email": "john@doe.com", "password": "password", "c_password": "password", "role": "admin" }
{ "email": "john@doe.com", "password":"password" }
{ "name":"technolgy" }
{ "name": "sample product1", "category_id": "2", "price":"123", "description":"lorem ipsum dolor", "image":"www.imagelink.com" }
{
"products": [
{
"name": "sample product1",
"category_id": "1",
"price":"123",
"description":"lorem ipsum dolor",
"image":"www.imagelink.com"
},
{
"name": "sample product2",
"category_id": "2",
"price":"123",
"description":"lorem ipsum dolor",
"image":"www.imagelink.com"
},
{
"name": "sample product3",
"category_id": "1",
"price":"123",
"description":"lorem ipsum dolor",
"image":"www.imagelink.com"
}
]
}