awcodes / filament-curator

A media picker plugin for Filament Panels.
MIT License
343 stars 89 forks source link

Collection & Morphable pivot table support #537

Open GeorgeFourkas opened 2 months ago

GeorgeFourkas commented 2 months ago

After a rework of the previous PR, and a fix on issue #529 a fix has been implemented, now supporting pivot morphable table and collections in the pivot table.

in order to use the pivot table users can now set the pivot model in the config file on the key 'intermediate_model', and its value should be the intermediate model class, i.e. MediaItem::class;

The previous got solved. We do not use get_class() anymore, so it cannot be called with integer arguements. Instead a comparisson of types is now used, where we compare the type of the intermediate model set in the config file, and the actual Media class that we fetch from the database.

awcodes commented 2 months ago

Thanks for the hard work. I will get this tested as soon as I can.

awcodes commented 1 month ago

Any update on this? ie, my review questions?

GeorgeFourkas commented 1 month ago

What questions?

awcodes commented 1 month ago

https://github.com/awcodes/filament-curator/pull/537/files/57f001647a73d719868666d3288bcdf3710b26a1