<?php

namespace App\Services\System;

use Illuminate\Support\Facades\DB;

class DatabaseHealthService
{
    public function check(): array
    {
        try {
            DB::select('SELECT 1');
        } catch (\Throwable $e) {
            return [
                'ok' => false,
                'error' => $e->getMessage(),
            ];
        }

        return [
            'ok' => true,
        ];
    }
}
