title: Laravel 5.5 Trait not found
body: <p>I can't wrap my head around this, as I have this on another project and works just fine.
  It is currently giving me this error </p>
  
  <blockquote>
    <p>Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
    Trait 'App\Traits\ResponseTrait' not found</p>
  </blockquote>
  
  <p>The UserRepository works just fine, the trait does not. I've tried renaming the trait, moving it to the repository folder, chmod it to 777, and I have no idea what could be wrong.</p>
  
  <p>Meet my HomeController, the laravel's default:</p>
  
  <pre><code>&lt;?php
  namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  use App\Repositories\UserRepository as User;
  use App\Traits\ResponseTrait;
  
  class HomeController extends Controller
  {
    use ResponseTrait;
  
    private $user;
  
    /**
    * Create a new controller instance.
    *
    * @return void
    */
    public function __construct(User $user)
    {
      $this-&gt;user = $user;
      $this-&gt;middleware('auth');
    }
  
    /**
    * Show the application dashboard.
    *
    * @return \Illuminate\Http\Response
    */
    public function index()
    {
      //dd($this-&gt;user-&gt;all()-&gt;toArray());
      //You can ignore the self:: part, as it doesn't reach this far.
      self::setData($this-&gt;user-&gt;all()-&gt;toArray());
      return "test";
      return view('home');
    }
  }
  </code></pre>
  
  <p>The trait:</p>
  
  <pre><code>&lt;?
  
  namespace App\Traits;
  
  trait ResponseTrait {
    public function setData($array) {
  
    }
  }
  </code></pre>
  
  <p>The trait's path is /app/Traits/ResponseTrait.php</p>
  
  <p>At my composer.json, I've got PSR-4 autoload with the App directive.</p>
  
  <pre><code>"psr-4": {
     "App\\": "app/"
  }
  </code></pre>
  
  <p>Edit1: I have tried composer dump-autoload, issue remains</p>