19 lines
418 B
PHP
19 lines
418 B
PHP
<?php
|
|
use App\Repository\KeaHostRepository;
|
|
|
|
$module = modules()->get('kea');
|
|
$fallback = $module['db_defaults'] ?? [];
|
|
|
|
$pdo = modules()->modulePdo('kea', $fallback);
|
|
$hosts = [];
|
|
$error = null;
|
|
|
|
try {
|
|
$repo = new KeaHostRepository($pdo);
|
|
$hosts = $repo->findAll(50);
|
|
} catch (\Exception $e) {
|
|
$error = "Datenbankfehler: " . $e->getMessage();
|
|
}
|
|
|
|
module_tpl('kea', 'dashboard', compact('hosts', 'error'));
|