Laravel: Getting Authenticated User Early in the Controller
Sometimes there is a need to access the authenticated user in your controller. If you do it in several methods in your controller, it makes sense to put the code in the constructor. Unfortunately, the code below will not work. This happens because the request is not injected into the controller at the time of…