Re-factored the routing to support API in the future.

This commit is contained in:
abdulmohsen
2024-03-02 20:28:24 +03:00
parent 3f4ff5c94d
commit 56d7b9ff10
60 changed files with 649 additions and 194 deletions

View File

@@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
namespace App\API\Backends;
use App\Libs\Attributes\Route\Post;
use App\Libs\HTTP_STATUS;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
#[Post(pattern: self::URL)]
final class Create
{
public const URL = '/api/backends';
public function __invoke(ServerRequestInterface $request, array $args = []): ResponseInterface
{
return api_response([
'message' => 'Create'
], HTTP_STATUS::HTTP_OK);
}
}