feat: add ClinicInvitationWebController and related templates for handling clinic invitations

- Implemented ClinicInvitationWebController to manage the invitation process via web.
- Added view and respond methods to handle invitation display and responses.
- Created result.html.twig and view.html.twig templates for rendering invitation results and views.
- Integrated CSRF protection for form submissions.
- Established routes for invitation viewing and responding.
This commit is contained in:
hamed
2026-07-11 09:33:55 +03:30
parent a5e3408e85
commit 744a40c0f6
19 changed files with 2125 additions and 671 deletions
@@ -74,7 +74,7 @@ class ClinicDoctorInvitation
$this->clinic = $clinic;
$this->invitedBy = $invitedBy;
$this->mobile = $mobile;
$this->token = bin2hex(random_bytes(16));
$this->token = bin2hex(random_bytes(6));
$this->invitedAt = time();
$this->expiresAt = $this->invitedAt + 72 * 3600;
}
@@ -94,7 +94,7 @@ class ClinicDoctorInvitation
public function refresh(): void
{
$this->token = bin2hex(random_bytes(16));
$this->token = bin2hex(random_bytes(6));
$this->tokenUsed = false;
$this->invitedAt = time();
$this->expiresAt = $this->invitedAt + 72 * 3600;