Symfony Easyadmin ManyToMany Fields On Index Page

764 Views Asked by At

I have three entities:

  • Attendee (holds basic attendee information)
  • Project (holds basic project information)
  • Attendance (links attendees and projects and holds more information like "invited_at", "is_confirmed"...)

One attendee can attend one project only once, but can of course attend multiple projects.

When I filter by project on the attendance index page one attendee can have only one or no attendance. In this case I want to display the corresponding attendance's information (like invited_at).

But fields like attendances.invited_at show no informartion on the attendee index page.

I guess this due to the n:n relation. Because fields like attendee.firstname are displayed without a problem on the attendances index page.

How can I get the attandance extra information to display on the attendee's index page?

1

There are 1 best solutions below

0
On

Ok, there is a quite obvious solution for this problem. Custom fields.

https://symfony.com/bundles/EasyAdminBundle/current/fields.html