Skip to content

Add user relationship to Review model#64

Open
shaharyarhq wants to merge 1 commit intocodebyray:masterfrom
shaharyarhq:patch-1
Open

Add user relationship to Review model#64
shaharyarhq wants to merge 1 commit intocodebyray:masterfrom
shaharyarhq:patch-1

Conversation

@shaharyarhq
Copy link
Copy Markdown

No description provided.

@shaharyarhq
Copy link
Copy Markdown
Author

Hi @codebyray,

I noticed the Review model includes a user_id field but does not define a corresponding user() relationship. This makes it difficult to eager load the associated user.

This PR adds a standard belongsTo relationship to improve usability and consistency with Eloquent conventions.

Let me know if you'd like any adjustments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant