шаг 1 сделан
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use App\Core\Database;
|
||||
|
||||
require_once dirname(__DIR__) . '/app/bootstrap.php';
|
||||
|
||||
$dbStatus = 'not_checked';
|
||||
|
||||
try {
|
||||
Database::pdo()->query('SELECT 1');
|
||||
$dbStatus = 'connected';
|
||||
} catch (Throwable $exception) {
|
||||
$dbStatus = app_env('APP_DEBUG', 'false') === 'true'
|
||||
? 'error: ' . $exception->getMessage()
|
||||
: 'error';
|
||||
}
|
||||
|
||||
view('pages/home', [
|
||||
'title' => 'Рыбсток',
|
||||
'dbStatus' => $dbStatus,
|
||||
]);
|
||||
Reference in New Issue
Block a user