add notifications logic and add support of both JWT and Sanctum

This commit is contained in:
root
2026-03-11 01:20:31 -04:00
parent f6be51576c
commit 182036cc41
141 changed files with 8685 additions and 648 deletions
+11 -5
View File
@@ -2,15 +2,21 @@
namespace App\Libraries;
use App\Services\Staff\StaffTimeOffLinkService as StaffTimeOffLinkTokenService;
class StaffTimeOffLinkService
{
public function __construct(private StaffTimeOffLinkTokenService $service = new StaffTimeOffLinkTokenService())
{
}
public function createToken(array $payload): string
{
$json = json_encode($payload);
if ($json === false) {
return '';
}
return $this->service->createToken($payload);
}
return rtrim(strtr(base64_encode($json), '+/', '-_'), '=');
public function parseToken(?string $token): ?array
{
return $this->service->parseToken($token);
}
}