- PHP 8.0
- Laravel Framework 9.52.15
- Postgresql 16.0
- Docker
- NGINX (http://127.0.0.1:8010/api/)
- git clone https://github.com/DeSKot/Laravel-live-coding
- add .env file and cope data from .env.example
- docker-compose up --build --force-recreate -d
- docker exec -it laravel-live-coding bash
- composer install
- php artisan migrate
| id | name | phone | photo |
|---|
- name = required / max-size = 256
- email = required / uniq / max-size = 512
- phone = can be null / max-size = 32
- photo = max-size = 1024 / default value = https://d3jqtupnzefbtn.cloudfront.net/andersenlab/new-andersensite/testimonials/60x60/without-photo.png
| id | name |
|---|---|
| 1 | USD |
| 2 | EUR |
- name - required / uniq / max-size = 4
| id | amount | user_id | currency_id |
|---|
- amount - required
- user_id - user id
- currency_id - currency id
[ { "name": "ad", "email": "@gmail.com", "phone": "+38000000000", "photo": "https://d3jqtupnzefbtn.cloudfront.net/andersenlab/new-andersensite/testimonials/60x60/without-photo.png", "wallets": [ { "currency": "USD", "amount": 12321314124134e312321 }, { "currency": "EUR", "amount": 12321314124134e312321 } ] }, { "name": "Mariya", "email": "@gmail.com", "phone": "+3800312300000", "photo": "https://d3jqtupnzefbtn.cloudfront.net/andersenlab/new-andersensite/testimonials/60x60/without-photo.png", "wallets": [ { "currency": "USD", "amount": 12321314124134e312321 }, { "currency": "EUR", "amount": 12321314124134e312321 } ] } ]
First of all you have to have created two users with wallet USD currency for each user
TO DO: Do transaction between wallets.
That all description, you have to come up with logic and realisation.
We will check how you can translate Owner task into code
grep -w '5432/tcp' /etc/services - check which service using this port
sudo systemctl stop - stop /start / restart / status of the service
psql -d mydb -U myuser
docker system prune -a - delete not running Containers / Images / Network / Build Cash
docker volume ls - display Volumes
docker volume rm - remove volume with a name what you saw in last command