A simple Laravel REST API to manage tasks, built for the developer test. It demonstrates:
- Task creation and retrieval
- Background job queue handling
- Docker-based deployment
POST /api/tasks
: Create a task with title, description, and statusGET /api/tasks
: Fetch all tasksLogTaskJob
: Logs task info tostorage/logs/tasks.log
using Laravel queue
⚠️ Authentication and security are NOT implemented. This is a basic public API for testing purposes.
Field | Type | Required | Description |
---|---|---|---|
title |
string | Yes | Max 255 characters |
description |
text | No | Optional |
status |
string | Yes | Must be one of: pending , in-progress , completed |
- Copy
.env.example
to.env
and update database/queue settings if needed. - Run the containers:
make up
- Access the API at: http://localhost:8000
Enter the app container and run migrations:
make shell
php artisan migrate
POST /api/tasks
Content-Type: application/json
{
"title": "Test task",
"description": "Optional text",
"status": "pending"
}
Method | Endpoint | Description |
---|---|---|
POST | /api/tasks | Create a new task |
GET | /api/tasks | Get all tasks |
Log entries will be written to storage/logs/tasks.log
by the queue worker:
This project uses Laravel’s database queue:
-
Ensure
.env
contains: -
The queue container automatically runs:
php artisan queue:work