title: Laravel can't set class variable in constructor
body: <p>I have a private variable in my class that I want to be set to the authenticated user. For some reason, though, I can't get the variable to be set inside of the constructor. Here is what I have so far:</p>
  
  <pre><code>private $user = null;
  
  
    public function __construct()
      {
          $this-&gt;middleware('auth');
  
          $this-&gt;user = Auth::user();
      }
  
   public function index()
      {
          $return['Admin'] = $this-&gt;user;
  
          return view('home', compact('return'));
      }
  </code></pre>
  
  <p>The variable <code>$user</code> stays null for some reason though. When I use <code>Auth::user()</code> in place of $this->user though, it works just fine. I have set variables from the constructor multiple times in the past and this is the first time it hasn't worked for me. Any help would be appreciated.</p>