title: how to pass session id in the email notification - laravel
body: <p>Am trying to login users through a link in email sent after registration.</p>
  
  <p>In my registration method I have the following code</p>
  
  <pre><code>$user_id = $user-&gt;id;
  Session::put('userId', $user_id);
  Auth::login($user_id);
  Auth::attempt(['email' =&gt; $request-&gt;email, 'password' =&gt; $request-&gt;password]);
  $email = $request-&gt;email;
  if($email != ''){
    $send = app()-&gt;make(\Snowfire\Beautymail\Beautymail::class);
    $send-&gt;send('emails.welcome', compact('r_message', 'username', 'passwordcode', 'user_id'), function($r_message) use ($email, $username) {
    $r_message
    -&gt;from('adun@demovalley.com')
    -&gt;to($email, $username)
    -&gt;subject('Welcome to Admiralty University!');
    });
  }
  </code></pre>
  
  <p>while I passed the session like this on the like</p>
  
  <pre><code>&lt;a href="{{ route('jamb/'. $user_id) }}"&gt;Click here&lt;/a&gt;
  </code></pre>
  
  <p>My route</p>
  
  <pre><code>Route::get('jamb/{user}', ['as' =&gt; 'jamb', 'uses' =&gt; 'CandidateController@jamb']);
  </code></pre>
  
  <p>but I get this error message.</p>
  
  <pre><code> ErrorException (E_ERROR)
   Route [jamb/66] not defined.
  </code></pre>
  
  <p>How can I make this to work?</p>