Eloquent Relationship or Query Builder for 3 relational tables?

Published 6 months ago by Edgy

Hi guys, I have 3 tables namely, workers_messages jobs and employers under workers_message have jobs_idcolumn. while jobs have employers_id .

I am creating like a inbox page, so I am the employer and I will get the records from workers_message. The relation is simple: workers_message.jobs_id -> jobs.employers_id -> employers

My question is, it is recommended to code this with Eloquent:Relationship? or Query Builder (like Inner Join)? I will expect to receive like 100 messages per jobs, which are recommended? Thanks

Best Answer (As Selected By Edgy)
Dry7
Dry7
Dry7
6 months ago (151,680 XP)

Please sign in or create an account to participate in this conversation.