title: Storing and retrieving constants in laravel
body: <p>I have just started playing with laravel haveing come from codeigniter and I am trying to work out the best way to define a series of constants.
  CI uses a constants folder under app/config and I was largely happy with this approach for most things but wanted advice as to the best way to do this in Laravel.</p>
  
  <p>My constants fall into 3 categories and I would like advice if possible on how best to store and retrieve each (baring in mind I'm completely new to Laravel.</p>
  
  <p><strong>Type 1</strong>:
  Constants which need to be loaded everytime a controller is called:
  e.g. I would like to start by defining a constant to tell me if the user is requesting content via ajax, this is what I used to do in CI constants file:
  <code>define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH']) &amp;&amp; strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest')</code></p>
  
  <p><strong>Type 2</strong>:
  Constants which can be changed by the user:
  Are these best stored in a database or would writing to a config file be a better option? Again looking for advice on how to store and retrieve</p>
  
  <p><strong>Type 3</strong>:
  Constants which are only needed in specific controllers:
  Ideally I would like to be able to group constants into arrays or separate files and pull them out in groups as required.
  e.g. I could just retrieve my upload settings for my upload controller.</p>
  
  <p>Thanks for any help/advice in advance - examples would be greatly appreciated</p>