hi,我有一个将信息记录到数据库表中的程序包,我想添加执行该操作的用户ID,即向该程序包付款,现在我的问题是我如何才能访问vendor文件夹中的user_id? ?这是它在下面插入的代码:
$this->transactionId = $this->getTable()->insert([
'id' => $uid,
'port' => $this->getPortName(),
'price' => $this->amount,
'status' => Enum::TRANSACTION_INIT,
'ip' => Request::getClientIp(),
'description' => $this->description,
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
]) ? $uid : null;
您可以通过Auth外观访问经过身份验证的用户: