attus / jsonapi
This package is abandoned and no longer maintained.
No replacement package was suggested.
JSON:API Formatter and Response
1.1
2022-03-02 10:18 UTC
Requires
- php: ^7.1
- symfony/http-foundation: ^3.4 || ^4.0
This package is auto-updated.
Last update: 2022-03-02 10:19:33 UTC
README
Simple JSON:API Serialization package
use Attus\JsonApi\Entity; use Attus\JsonApi\Response; $entity = new Entity(); $entity->setId($myId); $entity->setType($myType); $entity->setLink(['self', 'href'], $myLink); $entity->setAttribute($name, $value); $entity->setRelationship($name, $myRelationship); $data = $entity->getData(); return new Response($data);