Eloquent Relationship or Query Builder for 3 relational tables?

Posted 1 year 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

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

Reply to

Use Markdown with GitHub-flavored code blocks.