orlyapps / nova-belongsto-depend

Larave Nova BelongsTo Field with Dependcy
MIT License
182 stars 65 forks source link

Check if attribute relation is loaded when resolving attribute value #86

Closed cwilby closed 3 years ago

cwilby commented 3 years ago

When Nova goes to resolve a field value (e.g. Facility for City), this package currently fetches the related value (Facility) from the database without checking if it was previously eager loaded.

This patch yanks the logic from parent::resolve to check if the attribute being resolved is a relation that was previously eager loaded.

orlyapps commented 3 years ago

awesome thanks! 👍