使用供应商文件中的用户信息

问题描述 投票:0回答:1

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;
php laravel
1个回答
0
投票

您可以通过Auth外观访问经过身份验证的用户:

© www.soinside.com 2019 - 2024. All rights reserved.