I have three tables:
- users {id, first_name, last_name}
- applicants {id, first_name, last_name ......}
- marks {id, applicant_id, user_id, mark}
Table marks holds two foreign keys (applicant_id and user_id). So, the logic is like this: there are a lot of applicants and a few users. The user need to review every applicant and set some mark for him.
Desired output is to show (almost) all columns (attributes) from table "applicants", and to attach another column for each row from table "users", with users.last_name in "header" and desired mark in "body" for that applicant.
I'm using Laravel and Eloquent in this application and have no idea how to reach this.