Skip to content

Conversation

@zachgarwood
Copy link
Contributor

@zachgarwood zachgarwood commented Jan 30, 2025

Description

The Relation column does not properly display the value of fields on *-to-one related models. When collect() receives an individual object (such as an Eloquent model) it will convert it to a Collection. However, when Collection::wrap() receives an individual object it wraps it in a Collection, which is the desired behavior.

Related Issues

Fixes #2719
Fixes #2682

The Relation column does not properly display the value of fields on
*-to-one related models. When `collect()` receives an individual object
(such as an Eloquent model) it will convert it to an array. However, when
`Collection::wrap()` receives an individual object it wraps it in a `Collection`.
zachgarwood added a commit to art-institute-of-chicago/artic.edu that referenced this pull request Jan 30, 2025
nikhiltri pushed a commit to art-institute-of-chicago/artic.edu that referenced this pull request Feb 6, 2025
zachgarwood added a commit to art-institute-of-chicago/artic.edu that referenced this pull request Feb 12, 2025
zachgarwood added a commit to art-institute-of-chicago/artic.edu that referenced this pull request Feb 13, 2025
nikhiltri pushed a commit to art-institute-of-chicago/artic.edu that referenced this pull request Feb 13, 2025
@ifox ifox merged commit 74aca54 into area17:3.x Mar 11, 2025
8 checks passed
nikhiltri pushed a commit to art-institute-of-chicago/artic.edu that referenced this pull request Apr 15, 2025
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.

Relation columns of *-to-one relationship not displayed correctly Relation columns not displaying correctly

2 participants