/jobseeker-test

jobseeker.company | fullstack engineer

Primary LanguageJavaScript

Jobseeker Fullstack Engineer Test

Guide to cloning and setting up a Laravel project, connecting it to a database, and migrating the database.

Prerequisites

Make sure you have the following installed on your machine:

Clone & Install

git clone https://github.com/IGedeMiarta/jobseeker-test.git

Install Dependencies

cd jobseeker-test
composer install

Environment Configuration

Copy the .env.example file to create a new .env file:

cp .env.example .env

Open the .env file and configure your database connection:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=db_test
DB_USERNAME=root
DB_PASSWORD=

Migrate the Database

Run the following command to migrate the database:

php artisan migrate

Seed the Database (Optional)

If you want to populate the database with Faker data, use the --seed flag

php artisan migrate --seed

Run Application

php artisan serve

Visit http://localhost:8000 in your browser to access the Laravel application.

API Reference

Get all candidate

  GET /api/v1/candidate
Parameter Type Description
email string search by email
phone string search by phone_number
fullname string search by full_name
dob date search by date of birth dd/mm/yyyy
pob string search by place of birth
gender string search by gender (only F or M)
year_exp integer search by year of experience
salary integer search by of last salary
search string search email, phone_number, full_name, pob
order string filter by [ASC,DESC]
paginate integer order paginate (default 10)

Example Request With Parameter:

GET /api/v1/candidate?pob=denpasar&gender=F&paginate=50

The data where will returns candidate where place of birth is in denpasar, and gender female, the data will show per 50 items

Add New Candidate

  POST api/v1/candidate
Parameter Type Description
email string required, email, unique
phone_number string required, unique
full_name string required
dob date required,yyyy-mm-dd
pob string required
gender string required,only(F,M)
year_exp integer required
last_salary integer optional

Get Item By Id

  GET api/v1/candidate/{id}
Parameter Type Description
id string Required. candidate_id of item to fetch

Update Candidate

  PUT api/v1/candidate/{id}
Parameter Type Description
id string Required. candidate_id of item to fetch

POST Parameter:

Parameter Type Description
email string required, email, unique
phone_number string required, unique
full_name string required
dob date required,yyyy-mm-dd
pob string required
gender string required,only(F,M)
year_exp integer required
last_salary integer optional

Delete Candidate

  DELETE api/v1/candidate/{id}
Parameter Type Description
id string Required. candidate_id of item to fetch

Documentation

Postman Documentation