Tasks:
-
Correct all of the deficiencies in index.html
-
"Sectors" selectbox:
- 2.1. Add all the entries from the "Sectors" selectbox to database
- 2.2. Compose the "Sectors" selectbox using data from database
- Perform the following activities after the "Save" button has been pressed:
- 3.1. Validate all input data (all fields are mandatory)
- 3.2. Store all input data to database (Name, Sectors, Agree to terms)
- 3.3. Refill the form using stored data
- 3.4. Allow the user to edit his/her own data during the session
Write us Your best code!
After completing the tasks, please provide us with:
- Full database dump (structure and data)
- Source code
$ git clone https://github.com/degawl/HelmesTest.git
$ cd HelmesTest
Create file name .env or rename .env.example to .env
Add your environment variables to .env
DB_DATABASE=*****
DB_USERNAME=*****
DB_PASSWORD=*****
DB_PORT=*****
If you are using a remote DB:
DB_HOST=******
$ composer update
$ php artisan key:generate
$ composer dump-autoload
$ php artisan migrate:fresh
$ php artisan db:seed
$ php artisan serve
After migrating the database, seeding the sectors table and starting the server you can now access the application at your localhost.
Creating a user is required. After creating a user you may login using either you registered email or username.
All fields in form are mandatory. You can select up to 5 sectors.
The card on the right (or bottom in low-width view) shows the data currently stored in the db. To update the data simply resubmit the form with new data.
To run the tests make sure you are in the root directory and run the command
$ vendor/bin/phpunit
Have the parent/child relationship of the sectors be represented in select-box.