Am trying to login users through a link in email sent after registration.
In my registration method I have the following code
$user_id = $user->id;
Session::put('userId', $user_id);
Auth::login($user_id);
Auth::attempt(['email' => $request->email, 'password' => $request->password]);
$email = $request->email;
if($email != ''){
$send = app()->make(\Snowfire\Beautymail\Beautymail::class);
$send->send('emails.welcome', compact('r_message', 'username', 'passwordcode', 'user_id'),
function($r_message) use ($email, $username) {
$r_message
->from('adun@demovalley.com')
->to($email, $username)
->subject('Welcome to Admiralty University!');
});
}
while I passed the session like this on the like
<a href="">Click here</a>
but I get this error message.
ErrorException (E_ERROR)
Route [jamb/66] not defined.
How can I make this to work Thanks in Advance
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire