specialtactics / laravel-api-boilerplate

Laravel API Boilerplate | Quickly build quality API products!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WithPivot removed during transformation

DrRamazzotti opened this issue · comments

I have a many to many relation with additional fields.

It works fine until I try to query a item or collection with additional fields.

Return the "pure" raw item the additional pivot fields are there.

Using return $this->response->item($company, $this->getTransformer()); the additional fields wont appear.

commented

Hey @DrRamazzotti could you please provide some code examples of your models and the route you are calling?

commented

Hey @DrRamazzotti - happy to work on this, but can you give me some examples of how you are using pivots? Can you post some example models and a controller code and what you expect?