Package Data | |
---|---|
Maintainer Username: | bigpaulie |
Maintainer Contact: | bigpaulie25ro@yahoo.com (Paul P) |
Package Create Date: | 2017-02-26 |
Package Last Update: | 2019-03-06 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 03:01:38 |
Package Statistics | |
---|---|
Total Downloads: | 120 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This is a simple service provider for Laravel 5.x
The preferred way to install the package is via composer
composer require bigpaulie/fractal-laravel-service
After installing the package you need to add the service provider to your config/app.php
bigpaulie\fractal\FractalServiceProvider::class
First you need to create your transformers afterwards you can use the response helper with the corresponding macro
return response()->collection($collection, new YourTransformer());
return response()->collection($collection, new YourTransformer(), $collection);
return response()->item($item, new YourTransformer());
return response()->exception($exception, new YourTransformer());
If you want to contribute to this project, please fork and submit a pull request.