⚠️ [ABANDONED] Rinvex Attributable is a robust, intelligent, and integrated Entity-Attribute-Value model (EAV) implementation for Laravel Eloquent, with powerful underlying for managing entity attributes implicitly as relations with ease. It utilizes the power of Laravel Eloquent, with smooth and seamless integration.
In Attributable::relationsToArray(), the entity attributes for a model are only added to $eavAttributes if they exist in the array returned by parent::relationsToArray() (from HasAttributes), however, HasAttributes::relationsToArray doesn't know about the entity attributes, so the check always fails, causing the entity attributes to not be included when converting to JSON.
In
Attributable::relationsToArray()
, the entity attributes for a model are only added to$eavAttributes
if they exist in the array returned byparent::relationsToArray()
(fromHasAttributes
), however,HasAttributes::relationsToArray
doesn't know about the entity attributes, so the check always fails, causing the entity attributes to not be included when converting to JSON.