This is a PHP-based RESTful API that manages tasks using Domain Driven Design (DDD) architecture. The API allows users to create, read, update, and delete tasks.
- Installation
- Usage
- Endpoints
- Contributing
- License
Clone the repository:
git clone https://github.com/BaseMax/PHPTaskDDD.gitInstall dependencies using Composer:
cd PHPTaskDDD
composer installCopy the .env.example file to .env and put real values.
Configure the database connection in config/db.php.
Run the database migration:
vendor/bin/doctrine-migrations migrateStart the built-in PHP server:
php -S localhost:8000 -t publicUse your preferred HTTP client to make requests to the API endpoints.
The API has the following endpoints:
-
GET /tasksReturns a list of all tasks. -
GET /tasks/{id}Returns a single task by ID. -
POST /tasksCreates a new task. -
PUT /tasks/{id}Updates an existing task by ID. -
DELETE /tasks/{id}Deletes a task by ID.
Contributions are welcome! To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature.
- Make your changes and commit them with clear commit messages.
- Push your branch to your fork of the repository.
- Create a pull request to the main repository.
This project is licensed under the GPL-3.0 license.