public function delete(Photo $photo) { if (isset($this->photos[$photo->getId()])) { unset($this->photos[$photo->getId()]); } elseif (isset($this->hiddenPhotos[$photo->getId()])) { unset($this->hiddenPhotos[$photo->getId()]); } }
public function removePhoto(Contracts\Photo $photo) { if (array_key_exists($photo->getId(), $this->photos)) { unset($this->photos[$photo->getId()]); } }