title: How to set Global variable in Laravel?
body: <p>I am trying to set a global variable in Laravel, I set in <code>__construct()</code> function but can not use this outside of controller.
  Where should I set that variable?</p>
  
  <pre><code>public function __construct()
  {
      $cat = Categories::get()-&gt;first();
  }
  </code></pre>
  
  <p>but I can't access the <code>$cat</code> variable in some pages.</p>