Hello ____! Thank you for considering joining the Lawline team. Below is a coding exercise that will allow you to highlight your skills.
You have up to 48 hours to submit, however, we respect your time and expect this to only take a few hours. Please make commits reguarly so we can track your progress.
- Fork the code challenge repository on Github
- Run composer install
- Perform the configuration for a fresh install of Laravel
- Update the first line of this README with your name (so that it reads "Hello, YOUR NAME!"). Commit this change. This will serve as a starting timestamp.
- Complete the exercise below.
- Commit progress regularly.
- When your're done, upload your code.
- Email James [email protected] with any questions/issues
- You have up to 48 hours to submit.
- Create a simple RESTful API written in Laravel/PHP.
- All responses should be JSON
- All requests should be JSON
- Bonus: UI Interface implemented in a JS Framework
The exercise consists of users, subscriptions and products. A user will have the ability to add & remove products within their account. A user must have an active subscription to add a product to their account.
Each user must have, but is not limited to:
- ID
- First Name
- Last Name
- Email (unique)
Please note:
- These users are the only users that are able to make requests via the API.
- User creation/maintenance is not done through the API (see Database section below).
- Users can own many products
Each product must have, but is not limited to:
- ID
- Name
- Description
- Price
- Image
- MySQL
- All tables in the database must be created programatically
- The user table should be seeded with at least five users
You must implement an authentication system so that the API knows which of the users is making the request. All requests should ensure that an authorized user is making the request. In the event of an unauthorized user, an error should be thrown.
The following requests should be implemented:
- Add product
- All fields required except ID and image
- Update product
- All fields required except image
- Delete product
- Get product
- Upload product image
- Get list of all products
- Attach product to requesting user
- Remove product from requesting user
- List products attached to requesting user
You must write tests to back up your code. You are free to use any testing tools or frameworks you like.
Create a simple ui interface, written in your favorite JS Framework (Preferred: VueJS) for a user to
- Authenticate
- View all avaliable products
- Add/Remove products
When you are finished you will push up the application to a personal git repo. Then please notify James via email [email protected] with the subject Lawline Code Challenge and the link to the github repo. Please include:
- Instructions on how to create and seed database tables
- Instructions on how authentication works
- Instructions on how to compile assets (if anything)
- Anything else you think James should know to run the application (if anything)
James is available for any questions you may have via email at [email protected].