title: How to use a trait as a route controller method in laravel?
body: <pre><code>Target [App\Http\Controllers\Traits\FileUploadTrait] is not instantiable.
  </code></pre>
  
  <p>I get this error when trying to send a file upload to this route:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Traits;
  
  use Illuminate\Http\Request;
  use Intervention\Image\Facades\Image;
  
  trait FileUploadTrait
  {
  
      /**
       * File upload trait used in controllers to upload files
       */
      public function saveFiles(Request $request)
      {
        //some file upload code
      }
  
  }
  </code></pre>
  
  <p>in my route:</p>
  
  <pre><code>Route::post('upload/files', ['uses' =&gt; 'Traits\FileUploadTrait@saveFiles', 'as' =&gt; 'media.upload']);
  </code></pre>
  
  <p>how to use a trait as a route controller@method?</p>