title: Where do I put my custom classes and functions in Laravel
body: <p>I'm trying to build a class with some frequently used functions that I can use from anywhere in my project. I don't know where to build the PHP file with the classes in it or how to recall them... Can anyone help me figure out where all this stuff fits in? THANKS!!!</p>
  
  <p>/App/Http/Helpers/MyClasses.php</p>
  
  <pre><code>&lt;?php
  
  class PopularFunctions {
    public function sayhi() {
      echo 'hi';
    }
  }
  
  ?&gt;
  </code></pre>
  
  <p>/App/Http/Controllers/TasksController.php</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers;
  
  use App\Http\Helpers\MyClasses;
  
  class TasksController extends Controller {
  
    public function index() {
  
      $myfunctions = new PopularFunctions();
      $myfunctions-&gt;sayhi();
  
    }
  
  }
  </code></pre>
  
  <p>This returns: Class 'App\Http\Controllers\PopularFunctions' not found.</p>