在我尝试查看用户详细信息的地方,我总是会出错。请注意,我正在本地主机上运行。
$reflink = Reflink::where('user_id',$user->id)->first();
$totalRefer = Referral::where('reflink_id','=',$reflink->id)->get();
$ptc= UserLog::whereUser_id($user->id)->whereType(1)->select('amount')->sum('amount');
$ppv= UserLog::whereUser_id($user->id)->whereType(2)->select('amount')->sum('amount');
return view('admin.users.show',compact('user','invest','interest','referrer','totalRefer','ptc','ppv','upliner'));
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$user=User::find($id);
return view('admin.users.edit',compact('user'));
}