Domain Driven Design and Hexagonal Architecture example API using Laravel
Implementing Domain Driven Design and Hexagonal Architecture example API using Laravel.
git clone https://github.com/fSchettino/ddd-hexagonal-architecture-laravel.git
.cd ddd-hexagonal-architecture-laravel
.composer install
.php artisan key:generate
.php artisan migrate
.php artisan serve
.Run: php artisan test
.
Create a new user:
POST - http://127.0.0.1:8000/api/user
Body object:
{
"name": "Firstname Lastname",
"email": "[email protected]",
"password": "password_example"
}
-------------------------------------------
Get created user:
GET - http://127.0.0.1:8000/api/user/1
-------------------------------------------
Update existing user:
PUT - http://127.0.0.1:8000/api/user/1
Body object:
{
"name": "Name Surname",
"email": "[email protected]"
}
-------------------------------------------
Delete user:
DELETE - http://127.0.0.1:8000/api/user/1