GithubHelp home page GithubHelp logo

asxer / developer-test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from really-simple-systems/developer-test

0.0 0.0 0.0 599 KB

JavaScript 0.96% PHP 61.61% CSS 0.05% Vue 37.05% Blade 0.34%

developer-test's Introduction

Spotler CRM Developer Test

This test has been designed to allow us to see your Laravel and Vue knowledge. If you have any questions regarding this test you can email [email protected], and we will answer any questions that you may have.

We recommend taking 1-2 hours to complete the tasks, remember that if in this time you don't complete all the tasks this won't have a negative effect on your result, this test is about your approach and how you aim/aimed to tackle the problem at hand.

Using the project provided we want you to create a mini CRM, using Laravel, Inertia.js and Vue.js.

Once you have the repository cloned onto your machine, run the following commands:

composer install

npm install

npm run dev

Once you have completed the Database and Model tasks run:

php artisan migrate --seed

There are a set of tests implemented for you to check your work against, you will need to add a file called database.sqlite to the database directory. Once you have done this you can run them at any time using:

php artisan test

Tasks

Database

  • Add owner_id as a foreign key to accounts table where owner_id === user.id
  • Add account_id as a foreign key to contacts table
  • Add a unique index to the contacts table for the email column

Models

  • Add an eloquent relationship to the User model for a user to have multiple accounts associated with it
  • Add an eloquent relationship to the Account model for an account to have an owner
  • Add an eloquent relationship to the Account model for an accounts to have multiple contacts associated with it
  • Add an eloquent relationship to the Contact model for a contact to have an account

Routes

  • Make the welcome view only accessible if the user is unauthenticated
  • Make the dashboard and all the account and contact related routes only accessible to an authenticated user

Controllers

  • Implement the method stubs on the AccountController the associated front end Vue components are available in js/Pages/Accounts
  • Implement the method stubs on the ContactController the associated front end Vue components are available in js/Pages/Contacts

UI

  • Display the account and contact data in the tables in the Index.vue skeleton files (don't worry about pagination)
  • Display the account and contact data in the description area in the Show.vue skeleton files
  • Bind all inputs and implement form submission functionality in the Create.vue and Edit.vue skeleton files

Optional Tasks (only if you have time)

  • Add a middleware to only allow active user requests, logging a user out and returning them to login if they are inactive
  • Add a create user command

developer-test's People

Contributors

matt-ostrom-hall-rss 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.