Intégration reservations et mock lavage

This commit is contained in:
bastien
2026-07-03 19:01:49 +02:00
parent b2443b654c
commit 55a558b536
16 changed files with 346 additions and 5 deletions
@@ -0,0 +1,40 @@
<?php
namespace App\Http\Controllers\Api\V1;
use App\Http\Controllers\Concerns\RespondsWithJson;
use App\Http\Controllers\Controller;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\DB;
use Throwable;
class HealthController extends Controller
{
use RespondsWithJson;
public function index(): JsonResponse
{
return $this->success([
'status' => 'ok',
'service' => 'laverie-api',
'timestamp' => now()->toIso8601String(),
]);
}
public function database(): JsonResponse
{
try {
DB::select('SELECT 1');
return $this->success([
'status' => 'ok',
'database' => config('database.default'),
'timestamp' => now()->toIso8601String(),
]);
} catch (Throwable $e) {
return $this->error('Database connection failed', 503, [
'database' => ['Connection unavailable'],
]);
}
}
}