Search code examples
symfonysymfony2-easyadmin

How to display comma separated value in Easy Admin bundle Symfony


Where categories is multiple category collection?

fields:
 - { property: 'categories' }

I have try many type but still i am not able to display comma separated value, By default it is displaying number of items in array collection

thanks for help !


Solution

  • You should change your code as per below to display comma separated value in easy admin:

    fields:
      { property: 'categories', type: 'array' }
    

    If you will not add property type: 'array', then easy admin will display total number of items in array or array collection.