Open youmikuang opened 7 years ago
The way your models are glued in a response is handled by ypur serializer. You should define a new serializer and set it to your fractal manager.
I think right now you are using DataArraySerializer
. You could extend that serializer DataArraySerializer
and change collection method :
public function collection($resourceKey, array $data)
{
return ['data' => $data];
}
@catalinux thinks i will have a try
I used laravel5.3 and has a question
I want to get this data and Piece together a new array,
how can i do that