Month: October 2017

  • 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…

  • Composer: Path Repositories

    When working on a php package it is inconvenient to push the package to github (or other repository) and then wait for the package to update using composer update.  For package development, composer has such feature as path repositories.  Let’s imagine we have a two folders on the same level:  my-app and  package.   my-app is an app — a test…