Important
To learn how to install and also to know how I did this project, it's very important that you read every part of this readme. Thank you for your patience and have a good read.
This project was made with the idea to store and organize the employments offers that we receive and apply.
With two tables interlinked you can edit or add a new offer that you received, but you can also do that through endpoints.
The feedback table is the one that you can add comments, for example, if you made progress with an offer you can comment that as your progress and it will update. In the two forms we have the option to create and update.
-
We must display on the screen all our applied offers with their status (Blade).
-
There must be a status position that is "In Progress" or "Completed".
-
We must view all our offers applied by Endpoints.
-
We must be able to delete, insert, modify and view all the entrys through Endpoints.
-
We have to be able to watch the show on Endpoints.
-
We have to be able to see the show (Blade).
-
Date management 1 creation, 2 last modification.
-
70% minimum test coverage.
Take a look at how my project turned out.
Home Page
Comments Page
The diagram I did for my database in DrawSQL.
As you can see both of the tables are interlinked, this one, with a one to many relantionship.
Before you start to read how to install the project you'll need these requirements:
Note
If you can't install xampp, look for any other local server that supports MySQL and PHP
-
XAMPP
-
Install Composer
-
Install NPM in Node.js
-
Xdebug (for the tests coverage)
-
Postman
- Clone this repository:
https://github.com/rebecabernal/JobOfferSearch.git
- Install Composer and NPM
composer install
npm install
- Create a .env file copying everything inside the existing file .env.example and modify the following lines:
- DB_CONNECTION=mysql
- DB_DATABASE=job
-
Create a database in MySQL
-
Now go to the VSC terminal and put the following command
php artisan migrate:fresh --seed
This command will generate all the tables.
- Open another terminal in VSC and put the following command
npm run dev
- Open another terminal and run the server with this command
php artisan serve
You'll see an url that is going to take you to a website.
Important
Be sure that your running npm and the server in DIFFERENT terminals, DON'T close these two terminals and DON'T use other commands in these two terminals.
Note
Since we have two interlinked tables, each one of them has their own CRUD, this firsts endpoints are from the offers table.
In the offers table we have: title, enterprise, description, status and created_at timestamp.
Endpoints (Offers table)
GET all ids
http://127.0.0.1:8000/api/offers
GET an especific id
http://127.0.0.1:8000/api/offers/id
DELETE by id
http://127.0.0.1:8000/api/offers/id
POST update a new offer
http://127.0.0.1:8000/api/offers
PUT update an existing offer by id
http://127.0.0.1:8000/api/offers/id
Endpoints (Feedback table)
GET all id
http://127.0.0.1:8000/api/offers/offerid/news
GET an especific id
http://127.0.0.1:8000/api/offers/offerid/news/newsid
DELETE by id
http://127.0.0.1:8000/api/offers/offerid/news/newsid
PUT update an existing id
http://127.0.0.1:8000/api/offers/offerid/news/newsid
POST create new id
http://127.0.0.1:8000/api/offers/offerid/news
Important
It's important to test the project so we can check if it works correctly and to do that use this command in the VSC terminal:
php artisan test
This is what you should see after putting the command.
These are all my tests passed. I tested the web, the API CRUD, the feedback CRUD and the FeedbackModel.
To see the coverage you can use this command at the VSC terminal
php artisan test --coverage-html=coverage-report
Important
Everytime that you do new tests you need to put the command above in the VSC terminal, so it can update your coverage.
This will add a folder called "coverage-report", go to the folder, go to the index.html, and then open with live server. After that you should see this page:

Note
Please understand that i'm still learning, not everything will look or be perfect. Thank you for the attention.
If you want to contact me here's my gmail:rebecabernalmesa@gmail.com
Thanks for reading this readme!
Have a good day! :3



