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\Exceptions\InvalidPasswordResetTokenException;
use HiEvents\Http\Actions\BaseAction;
use HiEvents\Services\Application\Handlers\Auth\ValidateResetPasswordTokenHandler;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use Throwable;
class ValidateResetPasswordTokenAction extends BaseAction
{
private ValidateResetPasswordTokenHandler $validateResetPasswordTokenHandler;
public function __construct(ValidateResetPasswordTokenHandler $validateResetPasswordTokenHandler)
{
$this->validateResetPasswordTokenHandler = $validateResetPasswordTokenHandler;
}
/**
* @throws ResourceNotFoundException|Throwable
*/
public function __invoke(Request $request): Response
{
try {
$this->validateResetPasswordTokenHandler->handle($request->route('reset_token'));
} catch (InvalidPasswordResetTokenException $e) {
throw new ResourceNotFoundException($e->getMessage());
}
return $this->noContentResponse();
}
}