I am sending an entity to the database through a put request, but one of the variables is giving me trouble. I would like to know if there's a way to exclude a single variable from the request.
I am using axios for the db connection.
This is the entity being sent.
$this->id = 0;
$this->user = '';
$this->type = '';
$this->status = null;
$this->signatureList = new ArrayCollection();
//this is the array i want to exclude
$this->amendmentList = new ArrayCollection();
$this->draft = true;
$this->archived = false;
$this->canceled = false;
$this->finished = false;
$this->signed = false;
$this->subject = null;
$this->content = '';
$this->createdAt = new \DateTime();
parent::__construct();
This is the put request.
//it gets the entity through the id and sends it whole
update: (id, data) => {
window.httpMessage = { show: true, success: `Documento <b>#${id}</b> Atualizado`, error: "Documento <b>não Atualizado</b>" }
return http.put(`/eletronic-documents/${id}`, data).then(res => res.data)
}