[NFR]: Can we have condition for parent model in belongsTo
Open
@niden is already working on this.
Since Apr 10, 2021.
7.0
new feature request
- Dominant language
- PHP
- Stars
- 10.8k
- Forks
- 1.9k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 47
Description
So I have a DB doc_submitted which has two columns doc_type and doc_id where doc_type can refer to any table viz: assignment or task or book and doc_id will have respective id.
Now I want to write relationship in the DocSubmitted Model so I can refer them in view as doc_submitted.Assignment.topic or doc_submitted.Task.date.
If I'm putting the condition it's always searching in reference model instead of parent model.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.