1 | <?php |
||
13 | trait FractalTrait |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * By default the Dingo API package (in the config file) creates an instance of the |
||
18 | * fractal manager which takes the default serializer (specified by the fractal |
||
19 | * package itself, and there's no way to override change it from the configurations of |
||
20 | * the Dingo package). |
||
21 | * |
||
22 | * Here I am replacing the current default serializer (DataArraySerializer) by the |
||
23 | * (JsonApiSerializer). |
||
24 | * |
||
25 | * "Serializers are what build the final response after taking the transformers data". |
||
26 | */ |
||
27 | public function overrideDefaultFractalSerializer() |
||
52 | |||
53 | } |
||
54 |