argument('email'); if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $this->error('Invalid email format'); return; } $user = User::where('email', $email)->first(); if (!$user) { $this->error("User with email '{$email}' not found"); return; } try { NotificationHelper::passwordResetNotification($user, [ 'url' => url(route('password.reset', [ 'token' => Password::createToken($user), 'email' => $user->email, ], false)), ]); $this->info("Password reset email sent successfully to '{$email}'"); } catch (\Throwable $e) { $this->error('Failed to send password reset email: ' . $e->getMessage()); } } protected function promptForMissingArgumentsUsing(): array { return [ 'email' => 'What is the user\'s email address?', ]; } }