Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| HealthController | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| __invoke | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Http\Controllers\Api\V1; |
| 4 | |
| 5 | use App\Http\Controllers\Api\ApiController; |
| 6 | use Illuminate\Http\JsonResponse; |
| 7 | |
| 8 | class HealthController extends ApiController |
| 9 | { |
| 10 | /** |
| 11 | * Liveness probe for the API. Confirms routing + the envelope shape. |
| 12 | * The real storefront/admin endpoints are added from Phase 5 onward. |
| 13 | */ |
| 14 | public function __invoke(): JsonResponse |
| 15 | { |
| 16 | return $this->respond([ |
| 17 | 'service' => config('app.name'), |
| 18 | 'api' => 'v1', |
| 19 | 'status' => 'ok', |
| 20 | 'time' => now()->toIso8601String(), |
| 21 | ]); |
| 22 | } |
| 23 | } |