2016-03-21 16 views
4

Kullanıcı kayıt olduktan sonra, kullanıcının kayıtlarını yeniden göndermek için kullanabileceği bir bağlantı sağlamalıyım.Kayıt jetonu nasıl alınır?

Bağlantıda bir belirteci geçmem gerektiğinden, bu belirteci nasıl oluştururum?

return redirect()->route('frontend.index')->withFlashSuccess(trans('exceptions.frontend.auth.confirmation.resend')); 

nasıl Trans jetonu geçerdi

: Yani

public function register(RegisterRequest $request) 
    { 
     if (config('access.users.confirm_email')) { 
      $user = $this->user->create($request->all()); 
      event(new UserRegistered($user)); 
      return redirect()->route('frontend.index')->withFlashSuccess(trans('exceptions.frontend.auth.confirmation.resend')); 
     } else { 
      auth()->login($this->user->create($request->all())); 
      event(new UserRegistered(access()->user())); 
      return redirect($this->redirectPath()); 
     } 
    } 

RegistersUsers da

ex: http://dmain.com/account/confirm/resend/:token 

, bağlantı oluşturulur?

'resend' => 'Your account is not confirmed. Please click the confirmation link in your e-mail, or <a href="' . route('account.confirm.resend', ':token') . '">click here</a> to resend the confirmation e-mail.', 
+0

'csrf_token()' fonksiyonu: –

cevap

1

böyle dizi olarak değişkeni geçirerek bunu nasıl bulundu
0

Sen (belirteç şeklinde csrf_token() kullanılarak üretilir) kayıt sırasında istekte almak _token kaydedebilirsiniz. Ve bu belirteci, kullanıcıyı doğrulamak için bağlantıya gömülebilir.

return redirect()->route('frontend.index')->withFlashSuccess(trans('exceptions.frontend.auth.confirmation.resend', array('token' => $token))); 
Sen kullanarak deneyebilirsiniz