我试图获取表的'id',其中'user_id'==auth()->;id()(判断哪一行属于用户).
以下是我迄今为止取得的成就:
-
In the Controller with this line I'm trying access 'id' of Clients table where...
'client_id' => Clients::select('id')->where('user_id', auth()->id())->get()
-
一旦控制器被触发,它就会将"id"作为一个对象,并try 将其作为以下内容插入数据库:
有什么办法可以克服这个问题,这样我只能得到"id"值作为回报?