-
Install all dependencies -
composer install
-
Copy and rename
.env.example
to.env
or runcp .env.example .env
-
Modify the database configuration for
.env
file -
Run
php artisan key:generate
-
Run
php artisan migrate --seed
-
Run
composer install
to install dependencies -
Start up the server -
php artisan serve
-
Server should be running on http://localhost:8000
-
Access the API via http://127.0.0.1:8000/api/documentation
-
Access the API on Heroku via http://game-catalog-hmo-assessment.herokuapp.com/api/documentation
-
The API has two tables. 1 - The players, 2 - The gamepays
-
Since I am to assume each game only allows a maximum of 4 players, and there are 5 games with different versions, a player can play any of the games as long as the team does not exceed 4. With 10,000 players, a maximum of 2500 games can be played for a particular game version per day.
-
Assumption 2: Players can only play together if they have the same game versions: Mortal Combat 4 players can not play together with Mortal Combat 5 player.
-
With the assumptions, I ran a seeder file to generate 10,000 players and for each player a nested loop was written to generate random games, game versions and game plays for a maximum of 4 games per player.