Coder Social home page Coder Social logo

froots-challenge's Introduction

Froots PHP Technical Challenge

Setup

Create a new public Github repository and copy the contents of this file into the README.md, then please send us the link to the repository.

Please commit your work to the repository you created and remember to keep your commits clean and tidy.

Prequisites:

For this challenge, you will need the following services running on your machine:

  • PHP
  • a http server (e.g. nginx, apache, etc...)
  • a relational database (mysql, postgres, etc...)

You are free to set up those services in any way you like and can also use a pre-made dockerized development setup.

Challenge:

Create a new https://api-platform.com/ Symfony project using composer

Create a DB connection in Symfony using the .env file.

Create these endpoints:

* orders: id, amount, created_at, updated_at
* products: id, name, price, created_at, updated_at

An order can contain multiple products. When creating a new order, it should be possible to add products to the order. Write a custom endpoint via sub-resources that would make retrieving the data from the API possible in the following way:

order/123/products: Should return all the products in a specific order.
product/1/orders: Should return all the orders that have a specific product in them.

Add a dynamic generated field for the custom endpoint called product_url

Write tests for the above implementations.

Tips:

  • You can use Data Faker to simplify seeding your DB.

froots-challenge's People

Contributors

hdomos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.