andersao/l5-repository

Filter doesn't work with presenter

Open

#449 opened on Oct 8, 2017

View on GitHub
 (4 comments) (0 reactions) (0 assignees)PHP (868 forks)batch import
help wanted

Repository metrics

Stars
 (4,119 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

when i use presenter in repository class getting this result :

{{Url}}/bazaars?token={{token}}&filter=id;name

{
    "data": [
        {
            "id": 1,
            "name": "temp",
            "address": null,
            "city": null,
            "province_id": null
        },
        {
            "id": 2,
            "name": "temp1",
            "address": null,
            "city": null,
            "province_id": null
        }
]

but i need this:

{
    "data": [
        {
            "id": 1,
            "name": "temp",
        },
        {
            "id": 2,
            "name": "temp1"
        }
]

and i'm using fractal transformer.

Contributor guide