12848091a2
Update to Laravel 9 and PHP 8+ Co-authored-by: B.Fatih KOZ <fatih.koz@gmail.com>
31 lines
598 B
PHP
31 lines
598 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Api;
|
|
|
|
use App\Contracts\Controller;
|
|
use App\Services\VersionService;
|
|
|
|
/**
|
|
* Class StatusController
|
|
*/
|
|
class StatusController extends Controller
|
|
{
|
|
private VersionService $versionSvc;
|
|
|
|
public function __construct(VersionService $versionSvc)
|
|
{
|
|
$this->versionSvc = $versionSvc;
|
|
}
|
|
|
|
/**
|
|
* @return \Illuminate\Http\JsonResponse
|
|
*/
|
|
public function status()
|
|
{
|
|
return response()->json([
|
|
'version' => $this->versionSvc->getCurrentVersion(true),
|
|
'php' => PHP_VERSION,
|
|
]);
|
|
}
|
|
}
|