Skip to content

dyfero/Laravel-API-Domain-Architecture-Example

Repository files navigation

Laravel Logo

Build Status Total Downloads Latest Stable Version License

API Documentation

This project uses Scribe to generate API documentation. You can access the full interactive documentation by visiting /docs in your browser.

Authentication

This API uses Bearer Token authentication (via Laravel Sanctum). To access protected endpoints, you must provide the token in the Authorization header.

Header Format:

Authorization: Bearer <your-token>

Available Endpoints

Authentication

  • POST /api/auth/login - Log in and obtain an API token.

Votes

  • GET /api/votes - Retrieve a list of available votes.
  • GET /api/votes/{id} - Retrieve details of a specific vote.

User Votes

  • POST /api/user-votes - Cast a vote for a specific vote.
  • GET /api/user-votes/{id} - Retrieve your cast vote for a specific vote (where {id} is the vote ID).

Example Usage

Login:

// POST /api/auth/login
{
  "email": "test@example.com",
  "password": "password",
  "device_name": "my-device"
}

Cast Vote:

// POST /api/user-votes
{
  "vote_id": 1,
  "podcast_id": 1
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors