Listado proyectos

This commit is contained in:
2023-10-13 10:45:21 -03:00
parent 0d558b7980
commit c2a3192b32
26 changed files with 612 additions and 58 deletions

View File

@ -0,0 +1,13 @@
<?php
namespace Incoviba\Controller\API;
use Psr\Http\Message\ResponseInterface;
trait withJson
{
public function withJson(ResponseInterface $response, array $data = []): ResponseInterface
{
$response->getBody()->write(json_encode($data));
return $response->withHeader('Content-Type', 'application/json');
}
}