24 lines
554 B
PHP
24 lines
554 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Setting;
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
class PingController extends Controller
|
|
{
|
|
public function __invoke(): JsonResponse
|
|
{
|
|
$build = Setting::query()->where('key', 'build')->value('value');
|
|
$reportedBuild = $build !== null ? ((int) $build) + 1 : 1;
|
|
|
|
return response()->json([
|
|
'connect' => 'ok',
|
|
'version_status' => [
|
|
'build' => $reportedBuild,
|
|
],
|
|
'notification_state' => false,
|
|
]);
|
|
}
|
|
}
|