i am building a referral links to my users and i wanna pass a variables with the facebook Auth link like so :
<a href="{{ route('facebook.auth', ['id' => $id,'code'=>$code]) }} ></a>
i have tried to build a link tracker like so
public function trackLink($id=null,$code=null)
{
if (User::where('id',$id)->where('referral_code',$code)->first()) {
$points = Points::where('user_id',$id)->first();
$points->user_id = $id;
$points->points = Points::where('user_id',$id)->first()->points + 1000;
$points->save();
}
return redirect()->route('auth.facebook');
}
and i redirected the user to it but this repeat the points to the user each log in attempt
how do i send these variables with the auth link.