mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 09:51:37 +00:00
25 lines
630 B
PHP
25 lines
630 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Knuckles\Scribe\Attributes\Endpoint;
|
|
use Knuckles\Scribe\Attributes\Group;
|
|
use Knuckles\Scribe\Attributes\Unauthenticated;
|
|
use Spatie\RouteAttributes\Attributes\Get;
|
|
|
|
#[Group(name: 'general')]
|
|
class HealthController extends Controller
|
|
{
|
|
#[Get('api/health', name: 'api.health')]
|
|
#[Unauthenticated]
|
|
#[Endpoint(title: 'health-check')]
|
|
public function __invoke(): \Illuminate\Http\JsonResponse
|
|
{
|
|
return response()->json([
|
|
'success' => true,
|
|
'version' => config('app.version'),
|
|
]);
|
|
}
|
|
}
|