Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
<?php
namespace HiEvents\Http\Actions\Auth;
use HiEvents\Http\Actions\BaseAction;
use HiEvents\Http\Request\Auth\ForgotPasswordRequest;
use HiEvents\Services\Application\Handlers\Auth\ForgotPasswordHandler;
use Illuminate\Http\JsonResponse;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
class ForgotPasswordAction extends BaseAction
{
private ForgotPasswordHandler $forgotPasswordHandler;
public function __construct(ForgotPasswordHandler $forgotPasswordHandler)
{
$this->forgotPasswordHandler = $forgotPasswordHandler;
}
public function __invoke(ForgotPasswordRequest $request): JsonResponse
{
try {
$this->forgotPasswordHandler->handle($request->validated('email'));
} catch (ResourceNotFoundException) {
// swallow the exception to prevent leaking whether an email address is known
}
return $this->jsonResponse(
data: [
'message' => 'If the email address is known, an email has been sent with further instructions.',
]
);
}
}