Initial Kaffeekasse SaaS restart

This commit is contained in:
2026-06-15 17:13:38 +02:00
commit b08eb93547
54 changed files with 4617 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
<?php
namespace App\Core;
use PDO;
final class TenantContext
{
public function __construct(private readonly PDO $pdo)
{
}
public function bySlug(string $slug): ?array
{
$statement = $this->pdo->prepare(
'SELECT * FROM tenants WHERE slug = :slug LIMIT 1'
);
$statement->execute(['slug' => $slug]);
$tenant = $statement->fetch();
return $tenant ?: null;
}
}