title: Laravel Use a method from BaseController in a view
body: <p>As I need to get for every page a site configurations variables from a table of my database called 'site_configuration', I use a method in my baseController :</p>
  
  <p>In the <code>__constructor</code> i have</p>
  
  <pre><code>$this-&gt;config = SiteParameter::first();
  </code></pre>
  
  <p>and I have a public method to retrieve a variable :</p>
  
  <pre><code>public function getSiteParameter($variable)
  {
      return $this-&gt;config-&gt;$variable;
  }
  </code></pre>
  
  <p>If I do <code>$this-&gt;getSiteParameter('sitename')</code> it works. I'd like to do the same thing in a view. but without passing values to the view. I'd be happy if it was automatic.</p>