Skip to content

About

E-commerce REST API built with PHP, Laravel, MySQL and Laravel Sanctum authentication.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

E-commerce API

A REST API for e-commerce applications built with PHP and Laravel 10.

The API provides product and address management, user authentication and protected endpoints using Laravel Sanctum.

Tech Stack

  • PHP 8.1+
  • Laravel 10
  • MySQL
  • Laravel Sanctum
  • Laravel Fortify
  • Composer

Features

  • User authentication
  • Product management
  • Address management
  • Protected API routes
  • Product categories and variations
  • MySQL persistence

API

Products

GET /api/products
GET /api/products/{id}
POST /api/products
PUT /api/products/{id}
DELETE /api/products/{id}

Addresses

GET /api/address
GET /api/address/{id}
POST /api/address
PUT /api/address/{id}
DELETE /api/address/{id}

Most write operations require authentication through Laravel Sanctum.

How to Run

Clone the repository:

git clone https://github.com/lucasbdourado/api-ecommerce.git
cd api-ecommerce

Install dependencies:

composer install

Create the environment file:

cp .env.example .env

Generate the application key:

php artisan key:generate

Configure your MySQL database in .env and run:

php artisan migrate

Start the application:

php artisan serve

The API will be available at:

http://localhost:8000/api

About

E-commerce REST API built with PHP, Laravel, MySQL and Laravel Sanctum authentication.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages