ユーザーへの紹介リンクを作成しています。次のように、facebook Auth リンクを使用して変数を渡したいと思います。
<a href="{{ route('facebook.auth', ['id' => $id,'code'=>$code]) }} ></a>
私はそのようなリンクトラッカーを構築しようとしました
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');
}
そして私はそれにユーザーをリダイレクトしましたが、これはログイン試行ごとにユーザーへのポイントを繰り返します
認証リンクでこれらの変数を送信するにはどうすればよいですか。