php - laravel 4 reset password: sending multiple emails -


I have implemented Laravel's standard password reset functionality in my app. It works well except that I get 2 "reset password" emails in my inbox (side note which can not mean anything: none of the email is the subject line and the other does.) I do not think I am doing anything to normal, so I'm stumped. Any ideas?

  public function getRemind () {$ view = View :: make ('password.remind'); $ View- & gt; title = 'my title'; Return $ view; }   

form at random Blade.php

  {{form :: open (array ('url' = & gt; 'do-reset'))}} & lt; Fieldet & gt; & Lt; Label = "email" & gt; Email address & lt; / Label & gt; {{Form :: email ('email', $ email, array ('id' = & gt; 'email'))}} & lt; div id = "button_wrap" & gt; & Lt; Input type = "submit" id = "submit" name = "submit" value = "reset email" & gt; & Lt; / Div & gt; & Lt; / Fieldset & gt; @if (session: at ('position'))  P & gt; {{Session :: Mill ('position')}} & lt; / P & gt; @ediff @ if (session: ('error')) & lt; P & gt; {{Session :: Mill ('Error')}}   

Root for two-reset:

  Route: Post ('do-reset' , Array ('uses' = & gt; 'RemindersController @ postRemind'));   

I have not changed anything in the postarmed () method:

  public function postRemind () {password :: reminder (input :: only ( 'Email'), function ($ message) {$ message- & gt; topic ('click on the link below to reset your password.');}); Switch ($ response = password :: reminder (input :: only ('email')) {case password :: INVALID_USER: redirect: back () - & gt; Together ('error', lang :: get ($ response)); Case Password: REMINDER_SENT: Return Redirect :: Back () - & gt; Together ('Status', Lang :: Mill ($ response)); }}    

As you may see: passwords :: Reminders () The function is being called twice, I will change the code like this:

  public function postRemind () {$ response = Password :: Reminder (Input :: Receive ('email'), function ($ message) {$ message- & gt; topic ('click on the link below to reset your password.');}); Switch ($ response) {case password :: INVALID_USER: return redirect :: back () -> (with 'error', Lang :: get ($ response)); Case Password: REMINDER_SENT: Return Redirect :: Back () - & gt; Together ('Status', Lang :: Mill ($ response)); }}    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -