“ compact():未定义的变量:引荐来源网址”如何解决此错误

时间:2019-11-16 07:50:07

标签: php

View Screenshort

在我尝试查看用户详细信息的地方,我总是会出错。请注意,我正在本地主机上运行。

$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'));
}

0 个答案:

没有答案