You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use the (nested) include feature from Fractal, I can't register the transformer in a service provider like described in the docs (below) transformer documentation because the setTransformer does not exist on the Factory class. I use laravel 5.1.
$this->app['Dingo\Api\Transformer\Factory']->setTransformer(function ($app) {
return new Dingo\Api\Transformer\Adapter\Fractal(new League\Fractal\Manager, 'include', ',');
});
The include function works out of the box for simple includes, but I can't get nested includes to work properly like they do in fractal.
When I want to return a collection with nested relations I only get 'first level' includes, after that I get an empty array.
When I return an item, It works perfectly with nested includes.
I thought registering the transformer might help, which is how I came to that !!
Thanks very much for your help.
The text was updated successfully, but these errors were encountered:
I'd like to use the (nested) include feature from Fractal, I can't register the transformer in a service provider like described in the docs (below) transformer documentation because the setTransformer does not exist on the Factory class. I use laravel 5.1.
The include function works out of the box for simple includes, but I can't get nested includes to work properly like they do in fractal.
When I want to return a collection with nested relations I only get 'first level' includes, after that I get an empty array.
When I return an item, It works perfectly with nested includes.
I thought registering the transformer might help, which is how I came to that !!
Thanks very much for your help.
The text was updated successfully, but these errors were encountered: