getContent()
returns Array instead of Collection or Model when eager loading relations
#2876
Labels
getContent()
returns Array instead of Collection or Model when eager loading relations
#2876
Describe the bug
When a relation is eager-loaded, the
getContent()
method from theOrchid\Screen\AsSource
trait returns an array instead of a collection or model.To Reproduce
Steps to reproduce the behavior:
YourModel::first()->getContent('relationName')
.Expected behavior
The
getContent()
method should return a Collection or Model for consistency, especially when using it in a cell component withusingComponent()
.Is there a specific reason for prioritizing an array return?
Server (please complete the following information):
The text was updated successfully, but these errors were encountered: