You've already forked Php-Template
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m8s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 3m7s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m11s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m16s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 2m28s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m8s
28 lines
628 B
PHP
28 lines
628 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Siteworxpro\App\Controllers;
|
|
|
|
use Nyholm\Psr7\ServerRequest;
|
|
use Psr\Http\Message\ResponseInterface;
|
|
use Siteworxpro\App\Http\JsonResponseFactory;
|
|
|
|
/**
|
|
* Class IndexController
|
|
*
|
|
* This class handles the index route of the application.
|
|
*/
|
|
class IndexController extends Controller
|
|
{
|
|
/**
|
|
* Handles the GET request for the index route.
|
|
*
|
|
* @throws \JsonException
|
|
*/
|
|
public function get(ServerRequest $request): ResponseInterface
|
|
{
|
|
return JsonResponseFactory::createJsonResponse(['status_code' => 200, 'message' => 'Server is running']);
|
|
}
|
|
}
|