title: laravel 5.2 create common function for controllers? must use helper?
body: <p>i want to create a functions which can be called by all controllers</p>
  
  <pre><code>public function getSuffix($filename) {
  
      $first_char = substr($filename, 0 ,1);
      $sec_char = substr($filename, 1 ,1);
      $suffix ="";
  
      if($first_char!='.' &amp;&amp; $first_char!='..')
          $suffix .= '/'.$first_char.'/';
      if($sec_char!='.' &amp;&amp; $sec_char!='..')
          $suffix .= $sec_char.'/';
  
      return $suffix;
  }
  </code></pre>
  
  <p>what is the best practice for doing this? Is helper class what i'm searching?</p>