app/Http/Controllers/Admin/Auth/LoginController.php
/**
     * Send reset password email link.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Send reset password email link.
Send reset password email link .
public function sendResetLinkEmail(Request $request)
    {
        $request->validate(
            [
                'email' => 'required|email|exists:admins,email',
            ]
        );
        $token = str_random(60);
        $password_reset = new PasswordReset;
        $password_reset->email = $request->email;
        $password_reset->token = $token;
        $password_reset->save();
        $link = route('admin.show_reset_form', $token).'?email=' . urlencode($request->email);
        Mail::to($request->email)->send(new ForgetPasswordMail($link));
        return redirect()->back()->with('success', __('globals.msg.password_reset_email_sent'));
    }
public function sendResetLinkEmail ( Request $ request ) { $ request -> validate ( [ 'email' => 'required|email|exists:admins,email' , ] ) ; $ token = str_random ( 60 ) ; $ password_reset = new PasswordReset ; $ password_reset -> email = $ request -> email ; $ password_reset -> token = $ token ; $ password_reset -> save ( ) ; $ link = route ( 'admin.show_reset_form' , $ token ) . '?email=' . urlencode ( $ request -> email ) ; Mail :: to ( $ request -> email ) -> send ( new ForgetPasswordMail ( $ link ) ) ; return redirect ( ) -> back ( ) -> with ( 'success' , __ ( 'globals.msg.password_reset_email_sent' ) ) ; }
Send reset password email link.
Send reset password email link .
//Mail send