amani64 / api
Resuful response package for laravel with Fractal transformer
1.8.2
2019-06-02 04:57 UTC
Requires
- php: ^7.0
- illuminate/routing: ^5.8
- illuminate/support: ^5.8
- league/fractal: ^0.18
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.