Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Typed Property Must Not be Accessed Before Initialisation #88

Open
binhluong2012 opened this issue Sep 24, 2024 · 1 comment
Open
Labels
question Further information is requested

Comments

@binhluong2012
Copy link

Hello,
I have issue with this error when try to set relationship #[BelongsTo(Subject::class, 'subject')] on Course model.
When I query Course::with('subject')->query()..
it's showing error "Typed Property Must Not be Accessed Before Initialisation "
Not sure how to fix it.

Tables:
courses : id, name, subject_id
subjects: id, name

Thank you.

@WendellAdriel
Copy link
Owner

Can you please share:
1 - A repo with the setup to reproduce the error.
2 - A PR with a failing test case.

It's going to be easier to check and fix the issue that way.

@WendellAdriel WendellAdriel added the question Further information is requested label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants