Start: 15:25
End: 18:15
• download the project
• cp .env.example .env
• docker compose up -d (at the root of the project)
• docker compose exec app php artisan key:generate
• docker compose exec app php artisan storage:link
• docker compose exec app php artisan migrate
Also you can set body -> raw:
{
"limit": 2
}
This is not a required parameter, if it is not specified, the default value will be 10 users
Open Postman and send GET request to
http://localhost/api/randomUser
Also you can set body -> raw:
{
"type": "xml",
"field": "name",
"orderBy": "asc",
"limit": 50,
"page": 1
}
type can be specified as xml or json,
field is the field by which we will sort
orderBy you sort type (asc: a - z / desc: z - a)
limit is the limit of users on one page
page is simple pagination
All fields are also optional. By default, sorting will be performed by surname desc
• docker compose exec app php artisan test Made an email and the ability to log in for users. This can be checked by mailhog:
• Go to http://localhost:8025
• import users through PostMan and see the email, there will be login and pass
• then go to http://localhost and click login on the top right