MedicOneSystems / MedicOneSystems/livewire-datatables

Issue with multiple eloquent model on the same models

Open
#499 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

Hi there -

I am running into a problem - I have a phonecall table where there are two separate relationships on the 'phone' table referencing the caller and the receiver.

But in your code the query is built just referencing the phones table without phones as Caller left join on caller_id and phones as receiver left join on receiver_id

I can share more with you or talk through this with you. I'm thinking of trying to fix it either using the query builder or editing yoru code directly... will let you know.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Eloquent relationship query for a phonecall table with caller and receiver relationships on the phone table. Compare the query-builder path with the existing implementation and verify that both relationships can be resolved independently. Done means queries correctly support caller_id and receiver_id references without ambiguity.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.