Code Monkey home page Code Monkey logo

compare-fixed-by-seun's Introduction

PHP Developer Role - Technical Test

We have a network of companies that we would like to be able to match with users looking for services in their area. The network is still growing and right now and we only have companies covering Birmingham (B), Bristol (BS) and Cardiff (CF).

Unfortunately the dev looking after this project ran into some trouble and committed some broken and unfinished code. Can you help us out?

Prerequisites

  1. A LAMP environment running PHP ^7
  2. Set the DocumentRoot for the project in your Apache config or virtual hosts config
  3. Import companies and matching settings from project.sql into a database and connect to the app

Requirements

  1. Using data submitted in resources/views/layouts/form.twig, find a maximum of 3 random companies that cover:
    • the postcode prefix of the postcode entered
    • the number of bedrooms specified
    • the type specified
  2. Deduct a credit from all companies matched
  3. Return a view with a list of companies matched

Tips and hints

  • Getting a 500 error and not sure what's going on? What environment are you in? Do you expect to see errors?
  • It looks like there are some methods in the form controller that are called but not defined. Is this unfinished or has the dev forgotten something?
  • Can't connect to your database? Have you set the connection settings?
  • Getting errors in your views? Have you checked your blocks?

Bonus points

  • Prevent the form from being submitted twice by disabling the submit button on first submit
  • Reveal/Hide additional company information by clicking on the more link on the results page
  • Install a logger and log to file whenever a company runs out of credits

compare-fixed-by-seun's People

Watchers

Oluwaseun Mayowa S. 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.