php
>= 7.1php-mysql
php-xml
composer
>= 1.6.5mysql
>= 5.7.22
In the project directory, run:
composer install
Then edit the .env
file and set the DATABASE_URL
variable to the location of a database.
Then run these commands:
php bin/console doctrine:migrations:migrate
php bin/console doctrine:fixtures:load
php bin/console server:run
Then go to localhost:8000/{hotelId}/today/review
to view a random review for the given hotelId
.
Server-side caching was attempted in src/Repository/HotelRepository.php
, but cache items wouldn't expire
after the set expiry time. So currently it just clears the cache upon each request to demonstrate different
reviews being returned.