What is the best way to manage categories in php(symfony)

Hello i’m new to Symfony , i would like to know what is the best way or how i can manage categories?
i have to implement :
add
delete
modify
change order

json would be like this :

{
  "id": "234323",
  "name": "uomo",
  "parent": null,
  "child": [
    {
      "id": "1234532",
      "name": "abbigliamento",
      "parent": "234323",
      "child": []
    },
    {
      "id": "48525",
      "name": "maglione",
      "parent": "234323",
      "child": [
        {
          "id": "8765",
          "name": "maglione a maniche corte",
          "parent": "234323",
          "child": []
        }
      ]
    },
    {
      "id": "54464346",
      "name": "t-shiry",
      "parent": "234323",
      "child": [
        {
          "id": "435435",
          "name": "t-shirt a v",
          "parent": "54464346",
          "child": []
        }
      ]
    }
  ]
}

how can i get something like this in Symfony ?

Database : sql

Thanks for the input

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *