Skip to content

Commit bf78d31

Browse files
authored
Update apidoc.php
1 parent 7dd614f commit bf78d31

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

config/apidoc.php

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,6 @@
1717
*/
1818
'postman' => true,
1919

20-
/*
21-
* Fractal Transformer Config
22-
*
23-
* this is require https://github.com/thephpleague/fractal
24-
* composer require league/fractal
25-
*
26-
* If you are using custom serializer with league/fractal,
27-
* you can specify it here.
28-
*
29-
* Available serializers:
30-
* -League\Fractal\Serializer\ArraySerializer::class
31-
* -League\Fractal\Serializer\DataArraySerializer::class
32-
* -League\Fractal\Serializer\JsonApiSerializer::class
33-
*
34-
* default null means no serializer or just json return.
35-
*/
36-
'fractal' => [
37-
// example:
38-
// serializer' => League\Fractal\Serializer\JsonApiSerializer::class,
39-
'serializer' => null,
40-
],
41-
4220
/*
4321
* The routes for which documentation should be generated.
4422
* Each group contains rules defining which routes should be included ('match', 'include' and 'exclude' sections)
@@ -176,4 +154,22 @@
176154
* - size: 230 x 52
177155
*/
178156
'logo' => false,
157+
158+
/*
159+
* Configure how responses are transformed using @transformer and @transformerCollection
160+
* Requires league/fractal package: composer require league/fractal
161+
*
162+
* If you are using a custom serializer with league/fractal,
163+
* you can specify it here.
164+
*
165+
* Serializers included with league/fractal:
166+
* - \League\Fractal\Serializer\ArraySerializer::class
167+
* - \League\Fractal\Serializer\DataArraySerializer::class
168+
* - \League\Fractal\Serializer\JsonApiSerializer::class
169+
*
170+
* Leave as null to use no serializer or return a simple JSON.
171+
*/
172+
'fractal' => [
173+
'serializer' => null,
174+
],
179175
];

0 commit comments

Comments
 (0)