amani64/api

Resuful response package for laravel with Fractal transformer

1.8.2 2019-06-02 04:57 UTC

This package is auto-updated.

Last update: 2024-03-29 03:50:34 UTC


README

This package provide you restful json response.

Documentation

Create Factory class: $factory = app(Factory::class);

Set custom serializer:

$factory->transformer()->getAdapter()->setSerializer($serializer);

In your Controller:

return $factory->collection($collection, MyTransformer::class, ['identifier'=> 'myData'])

License

This package is licensed under the BSD 3-Clause license.