Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all articles
Browse latest Browse all 3925

How I can get the current user into my entity classes?

$
0
0

I am developing my first symfony 4 application and I migrating from symfony 2+ and symfony 3+, I know a lot has changed and I'm feeling a little lost.

Right now I am developing a backend and all of my entity classes have a addedBy and updatedBy methods where I need to record the current logged in administrator, I would like to have something like an event listener where I do not have to set those methods in all of my controllers.

Any ideas how to accomplish this?


Viewing all articles
Browse latest Browse all 3925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>