Preview:
  $user = User::where('email', $email)->first();
                 if ($user) {
                    //so we can have dependency 
                    $password_broker = app(PasswordBroker::class);
                    //create reset password token 
                    $token = $password_broker->createToken($user); 

                    DB::table('password_resets')->insert(['email' => $user->email, 'token' => $token, 'created_at' => new Carbon]); 

//Send the reset token with your own template
//It can be like $link = url('/').'/password/reset/'.$token;

                }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter