Skip to content

Commit 3873faf

Browse files
committed
Update Response Transformer example
1 parent 19de2e5 commit 3873faf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ Fractal is the default response transformer.
109109
You can configure this in your `.env`. file, however, advanced configuration will need to take place in a published configuration file or in your bootstrap file.
110110

111111
```php
112-
$app['Dingo\Api\Transformer\Factory']->setTransformer(function ($app) {
113-
$transformer = new League\Fractal\Manager;
112+
$app['Dingo\Api\Transformer\Factory']->setAdapter(function ($app) {
113+
$fractal = new League\Fractal\Manager;
114114

115-
$transformer->setSerializer(new League\Fractal\Serializer\JsonApiSerializer);
115+
$fractal->setSerializer(new League\Fractal\Serializer\JsonApiSerializer);
116116

117-
return $transformer;
117+
return new Dingo\Api\Transformer\Adapter\Fractal($fractal);
118118
});
119119
```
120120

0 commit comments

Comments
 (0)