The goal of this test is to create a RESTful API using the PHP framework of your choice.
The API should focus on two entities: agencies and services, with a relationship between the two entities - an agency can provide multiple services, and a service can be offered by multiple agencies.
An example Docker Compose configuration is provided in this repository that you may use as a base for your development environment. It will require some tweaking depending on your framework, however, if you are more comfortable with another environment such as Vagrant or Homestead please use that instead.
Please fork this repository, and place your application code in the application
directory.
- The API should have some form of token based authentication.
- There should be testing in place covering the key areas of the API - this can be unit and / or functional testing using PHPUnit, Behat etc.
The following functionality should be accessible via appropriate RESTful HTTP calls.
- Retrieve an index of agencies
- View details of single agency by retrieving it by its ID
- Create a new agency
- Retrieve an index of services
- View details of a single service by retrieving it by its slug
- View the services an agency offers
- Update the services an agency offers
The following fixture / seed data should be used for your API:
Agency Name | Contact Email | Web Address | Short Description | Established |
---|---|---|---|---|
RoRo's Rocket Chips | [email protected] | http://roro.com | The fieriest chips known to man. | 2019 |
Heavy Profesh Web Dev | [email protected] | https://greatdevs.biz | The most professional developers in town. | 1994 |
Shass Kinsalott | [email protected] | https://shasskinsal.ot | Post-modern audio branding agency based in London. | 2000 |
Service Name | Slug |
---|---|
Web Development | web-development |
PPC | ppc |
SEO | seo |
Agency Name | Services |
---|---|
RoRo's Rocket Chips | Web Development, PPC |
Heavy Profesh Web Dev | Web Development, SEO |
Shass Kinsalott | PPC, SEO |