mardi 26 décembre 2017

Override core - reset password file in laravel

I need to send success email for after resetting password in laravel-5.4

I write code like this :

File path : mylaravel/vendor/laravel/framework/src/Illuminate/Foundation/Auth/ResetsPasswords.php

Mycode :

protected function resetPassword($user, $password)
{
    $user->password = Hash::make($password);

    $user->setRememberToken(Str::random(60));

    $user->save();

$mail_data = array('name' => $user->first_name);

    Mail::send('mails.forgotpassword', $mail_data, function ($message) use($user) {
          $message->from(Config::get('globalvars.CONTACT_EMAIL'), 'Its Your Skills');
          $message->to($user->email);
          $message->subject('Forgot Password regarding');
    });

    event(new PasswordReset($user));

    $this->guard()->login($user);
}

i writed that mail code , This one working fine . but for updating composer that code will automatically delete. so i need to know how to doo this action in mylaravel/app folder. any help?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2DShMOV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire