title: Custom helper classes in Laravel 5.4
body: <p>I have some helper classes in <code>app/Helpers</code>. How do I load these classes using a <code>service provider</code> to use them in blade templates?</p>
  
  <p>e.g. If I have a class <code>CustomHelper</code> that contains a method <code>fooBar()</code> :</p>
  
  <pre><code>&lt;?php
  
  nampespace App\Helpers;
  
  class CustomHelper
  {
      static function fooBar()
      {
          return 'it works!';
      }
  }
  </code></pre>
  
  <p>I want to be able to do something like this in my blade templates:</p>
  
  <pre><code>{{ fooBar() }}
  </code></pre>
  
  <p>instead of doing this:</p>
  
  <pre><code>{{ \App\Helpers\CustomHelper::fooBar() }}
  </code></pre>
  
  <p><strong>P.S:</strong> @andrew-brown's <a href="https://stackoverflow.com/a/28360186/5689855">answer</a> in <a href="https://stackoverflow.com/questions/28290332/best-practices-for-custom-helpers-on-laravel-5">Best practices for custom helpers on Laravel 5</a> deals with non-class files. It would be nice to have a class based solution so that the helper functions can be organized among classes.</p>