add all controllers logic
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user