小编Met*_*ass的帖子

API平台按空值过滤

我正在寻找一种解决方案来根据为空的参数(用户)恢复 get 中的数据:

    {
  "@context": "\/api\/contexts\/ShippingCost",
  "@id": "\/api\/shipping_costs",
  "@type": "hydra:Collection",
  "hydra:member": [
    {
      "@id": "\/api\/shipping_costs\/1",
      "@type": "ShippingCost",
      "id": 1,
      "minWeight": 0,
      "maxWeight": 251,
      "france": 4.87,
      "domTom": 4.21,
      "aerial": 3.84,
      "zone": {
        "@id": "\/api\/zones\/1",
        "@type": "Zone",
        "id": 1,
        "name": "Guadeloupe",
        "TaxFOB": 35,
        "TaxSurete": 0.2,
        "TaxFuel": 0.77,
        "TaxGuerre": 0.24,
        "Lta": 0,
        "InfoDouane": 24,
        "CreditEnlevement": 0,
        "EntreposageCci": 0.4,
        "EntreposageCciMin": 15,
        "RemiseDoc": 43,
        "Surete": 0,
        "AvanceFond": 0,
        "Tid": 13,
        "Spia": 10,
        "InterTransite": 50
      },
      "user": null
    },
{
      "@id": "\/api\/shipping_costs\/162",
      "@type": "ShippingCost",
      "id": 162, …
Run Code Online (Sandbox Code Playgroud)

api symfony api-platform.com

5
推荐指数
1
解决办法
4281
查看次数

标签 统计

api ×1

api-platform.com ×1

symfony ×1