Stack & Setup
- Dockerisierte Dev-Umgebung (PHP 8.4-FPM, Nginx, MariaDB 11.4)
- Symfony 7.4 + API Platform 4.3, Doctrine ORM, LexikJWT, Messenger
- Vue 3 + TS (Vite), Vue Router, Pinia, Axios
Kern-Domäne & Auth
- Entitäten: User, PlatformPlan, Reseller, Company, Domain, Location,
Employee, ContactLink (UUIDv7)
- JWT-Login (/api/login), Rollen-Hierarchie, /api/me
- Mandantentrennung via API-Platform-Query-Extension (Lesen) +
TenantStampProcessor (Schreiben)
Öffentliche Profile (SSR)
- Profil-Landingpage, vCard-Download, QR-Code im Marken-Look
- Stabiler NFC/QR-Kurz-Link /t/{code} -> Redirect aufs aktuelle Profil
- Firmenspezifisches Branding (Farben/Logo) auf der Profilseite
Verwaltungsoberfläche (SPA)
- Brand-Look (dunkle Sidebar), rollenbasierte Navigation
- Dashboard, Reseller (+Provisioning), Firmen, Mitarbeiter, Standorte,
Domains, Design/Branding mit Live-Vorschau
Konzept & Doku: docs/KONZEPT.md (inkl. Wallet/Sync §12), README.md
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Repository\EmployeeRepository;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Symfony\Component\Routing\Attribute\Route;
|
|
|
|
/**
|
|
* Stabiler Kurz-Link für NFC-Tags / gedruckte QR-Codes.
|
|
* Leitet anhand des unveränderlichen Codes immer auf das aktuelle Profil um.
|
|
*/
|
|
final class ShortLinkController extends AbstractController
|
|
{
|
|
public function __construct(private readonly EmployeeRepository $employees)
|
|
{
|
|
}
|
|
|
|
#[Route('/t/{code}', name: 'short_link', methods: ['GET'])]
|
|
public function __invoke(string $code): Response
|
|
{
|
|
$employee = $this->employees->findByShortCode($code);
|
|
if (null === $employee) {
|
|
throw $this->createNotFoundException('Unbekannter Code.');
|
|
}
|
|
|
|
return new RedirectResponse($this->generateUrl('public_profile', [
|
|
'companySlug' => $employee->getCompany()->getSlug(),
|
|
'slug' => $employee->getSlug(),
|
|
]), 302);
|
|
}
|
|
}
|