I'm using easyadmin with my online learning website project for school. Teachers can add formations, sections which are attached to formations, and lessons which belong to sections. I set up three cruds for each, and queries so the logged in user can only see content they created.
The issue is that when adding a new entry, easyadmin doesn't set up the logged in user_id in the database, and I get the following error: An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null
I get where it's coming from, you can't add an entry to the database without the user_id since it's not nullable, but I can't seem to find where I can set up easyadmin so it always passes the user_id when adding a new entry. Can you edit the add action somewhere?
Thanks!