Started learning Symfony and ran into a problem. How to check if a user is logged into the site and how to get it? For example, in Laravel it is done something like this: Auth::check()
or get user id: Auth::user()->id
. I can use about the same thing in the blade template engine.
How can I do the same in Symfony? How can I check a user and get his object?