Skip to content
Advertisement

easyadmin 3 – Sorting by linked entity’s property instead of id

I have one entity Hike which have relation with another named Department

JavaScript
JavaScript

In easyAdmin3 rendering is fine like enter image description here

But when I sorting by department I see that easyAdmin3 sort by department’s id, and I would like sorting by department_nom

I saw many solutions but they all using easyAdmin2 and easy_admin.yaml which no longer exists now.

There is a way to achieve that ?

Advertisement

Answer

Use configureCrud. Something like this should do the trick.

JavaScript

You can also use the filter to get the resultat wanted.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement