我正在通过 put 请求向数据库发送一个实体,但其中一个变量给我带来了麻烦。我想知道是否有办法从请求中排除单个变量。
我正在使用 axios 进行数据库连接。
这是被发送的实体。
$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();
这是放置请求。
//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)
}
尚方宝剑之说