I have a problem, I would like to run some method before loading the CRUD view, which will connect to the API, download the data and update it in the database, and finally display the CRUD view with the correct data.
Connection to API, data download and update and display I have done, I just don't know how to do it before loading CRUD.
Thanks for the help
CodePudding user response:
EasyAdminBundle provides a BeforeCrudActionEvent
you can build a listener for. In your listener you can call the API and update your database and potentially already add the data to the event.
See the docs for more details: https://symfony.com/bundles/EasyAdminBundle/current/events.html