I have a model (Offer
) which has a relation getContactPeople()
.
When I access the relation…
$offer = Offer::find($offerId);
var_dump($offer->contactPeople);
var_dump($offer->getContactPeople());
the output from the (magic getter) property is an array, while the method is still an ActiveQuery
. I expected them to be equal.
Is there something in the docs about the rationale behind this behavior?
Additional question: How could I order contact people by a rank in the ContactPeople
model?