خرید بک لینک

Vote count: 0

I already looked into several example on how to remove the key "data" in response, but i caot fix it.

I tried to use the callback provided by dingo

retu $this->collection($users, new UserTransformer, function ($resource, $fractal) {
    $fractal->setSerializer(new ArraySerializer);
});

In change the "$fractal->setSerializer(new CustomSerializer);" to "$fractal->setSerializer(new ArraySerializer);" since I dont have CustomSerializer(And how to make this custom serializer?) based on the fractal documentation array serializer but the out put has the key "data".

I also tested the fractal library in different project and implementing the ArraySerializer as the Serializer, and it works.

What am I missing in the setup of dingo-fractal?

Thanks.

asked 52 secs ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 31 خرداد 1395 ساعت: 18:11

صفحه بندی