docker-compose up -d
cd src
composer update --ignore-platform-reqs
sudo chmod -R 777 storage
php artisan key:generate
docker exec -it php_ php artisan migrate --force
docker exec -it php_ php artisan db:seed
Запрос:
curl -X GET http://localhost:8080/api/users
Ответ:
[
{
"id": 1,
"email": "[email protected]",
"first_name": "egixANZ",
"last_name": "Snn7iUn"
},
{
"id": 2,
"email": "[email protected]",
"first_name": "nczZhKO",
"last_name": "s1LCLs1"
}
]
Запрос:
curl -X GET http://localhost:8080/api/users/1
Ответ:
{
"id": 1,
"email": "[email protected]",
"first_name": "egixANZ",
"last_name": "Snn7iUn"
}
Запрос:
curl -XGET http://localhost:8080/api/users/event/15
Ответ:
[
{
"id": 28,
"email": "[email protected]",
"first_name": "MBlnMmf",
"last_name": "B5jDi0V"
}
]
Запрос:
curl -d "[email protected]&first_name=qwe&last_name=ewq" -X POST http://localhost:8080/api/users
Ответ:
{
"email": "[email protected]",
"first_name": "qwe",
"last_name": "ewq",
"id": 31
}
Запрос:
curl -d "id=31&[email protected]&first_name=www&last_name=www" -X PUT http://localhost:8080/api/users
Ответ:
{
"email": "[email protected]",
"first_name": "www",
"last_name": "www",
"id": 31
}
docker exec php_ php artisan test