IsraelOrtuno / Eavquent

EAV modeling package for Laravel and Eloquent – This package is abandoned, please use this fork https://github.com/rinvex/attributes
63 stars 13 forks source link

Delete Attribute Values when Attribute is Destroyed? #46

Closed timramseyjr closed 6 years ago

timramseyjr commented 8 years ago

I might be missing something, but is there a way to remove all of the attribute values (boolean,datetime,floatnum,integer,text,varchar) when the attribute is destroyed?

Attribute::destroy($id);

It removes the attribute as expected(eav_attributes), but all of the values remain in the type tables.

something like a cascade delete on a foreign key attribute_id

But like I said previously, I may be missing a detail where this doesn't make sense, or the feature exists that I am not aware of.

IsraelOrtuno commented 7 years ago

This part was not yet implemented :( I am currently working on the package so may have news soon