title: Dynamic Global Variables
body: <p>I am new in web development and using laravel framework for my 1st project.  I am trying to define a dynamic global variable.</p>
  
  <p>My problem is as under :
  I want to setup two types of app users.  One that are fixed to a specific branch and second who will select a branch.  I have added a branch_id column to my users table and its working properly.  Zero in this column means the user will select his branch after login.  What I want is to store branch_id to a global variable that can be accessed everywhere (controllers, views, etc.).
  I have tried to use Config but the new value is available only in current code block.</p>
  
  <p>{{ Config::set('pubvar.lbranch','Testing') }}</p>
  
  <p>{{ config('pubvar.lbranch') }}</p>
  
  <p>I need assistance regarding this in a simple possible way.  Sample code will be highly appreciated.</p>