This application provides an API to retrieve, add, edit and delete HMC approved restaurants.
- PHP 5.5.9 or higher
- Composer
Run the following command to install project dependencies.
composer install
Database name and host will be configured when the composer install
runs.
- Create database with the following command (should not be used on production):
php bin/console doctrine:database:create
- Create the database tables (based on Doctrine entity classes) with the following command (shoult not be used on production):
php bin/console doctrine:schema:create
- To populate the database with initial outlet:
php bin/console outlet:retrieve "https://halalhmc.org/outlets/?cat=restaurants-and-takeaways&distance=25&q=London%2C+UK&lat=&lang="
PHPUnit tests can be run by the following command:
./vendor/bin/simple-phpunit
- /api/v1/outlets/nearest/{longitude}/{latitude} - (GET request) Returns the 10 nearest outlets to a given geocode
- Symfony 3.4 The web framework used.
- Doctrine ORM layer.
- Gouette Used to retrieve outlets from HMC websites.
- BazingaGeocoderBundle Used to Geocode postcodes.
- CraueGeoBundle Used to calculate distance between postcodes or geocodes.
Saeed Bhuta