cloudinary-laravel
cloudinary-laravel copied to clipboard
detachMedia deletes ALL images attached to an entity
https://github.com/cloudinary-labs/cloudinary-laravel/blob/ab0dc2d2dfefbeb67c7b282b72e6203802c36582/src/MediaAlly.php#L82
This method is problematic. It gets ALL the images associated to the entity, and deletes them all...
Need to have an if statement to check for nullness of $media param, if not null, only delete given media, else then delete all.
For a destructive action like delete all media, it should even be consider to have a separate method just for that...