/** * Delete owners of mediafile */ public function deleteOwners() { foreach ($this->attributes as $attr) { Mediafile::removeOwner($this->owner->primaryKey, $this->name, $attr); } }