title: File Upload to aws S3 Laravel 5.1
body: <p>I am getting the Following Error:</p>
  
  <blockquote>
    <p>FatalErrorException in FilesystemManager.php line 179: Class
    'League\Flysystem\AwsS3v3\AwsS3Adapter' not found</p>
  </blockquote>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>//Composer.json
  
      "require": {
              "php": "&gt;=5.5.9",
              "laravel/framework": "5.1.*",
              "laravel/socialite": "~2.0",
              "guzzlehttp/guzzle": "~4.0",
              "predis/predis": "^1.0",
              "tymon/jwt-auth": "0.5.*",
              "league/flysystem-aws-s3-v2": "^1.0"
          },
          "require-dev": {
              "fzaninotto/faker": "~1.4",
              "mockery/mockery": "0.9.*",
              "phpunit/phpunit": "~4.0",
              "phpspec/phpspec": "~2.1"
          }
  
  //config/filesystem.php
  
  
      'default' =&gt; 's3',
       'cloud' =&gt; 's3',
       'disks' =&gt; [
  
              'local' =&gt; [
                  'driver' =&gt; 'local',
                  'root'   =&gt; storage_path('app'),
              ],
  
              's3' =&gt; [
                  'driver' =&gt; 's3',
                  'key'    =&gt; '***********',
                  'secret' =&gt; '**************************************',
                  'region' =&gt; '*****',
                  'bucket' =&gt; '************',
              ],
  
  
          ],
  
  //FileController
  
      namespace App\Http\Controllers;
      use Illuminate\Http\Request;
      use App\Http\Requests;
      use Illuminate\Contracts\Filesystem\Filesystem;
      use App\Http\Controllers\Controller;
      use JWTAuth;
      use Tymon\JWTAuth\Exceptions\JWTException;
      public function postProfilePhoto(Request $request)
          {
              $token=JWTAuth::getToken();
              $user = JWTAuth::toUser($token);
              $image = $request-&gt;file('image');
              //return $image;
              $id=$user-&gt;id;
              if($image)
              {
              $imageFileName = time() . '.' . $image-&gt;getClientOriginalExtension();
              //return $imageFileName;
              $s3 = \Storage::disk('s3');
          $filePath = '/profilePhotos/'.$id . $imageFileName;
          $s3-&gt;put($filePath, file_get_contents($image), 'public');
  
              try{
                  ProfilePhoto::create(['userId'=&gt;$id,'imgUrl'=&gt;$filePath]);
  
                  return json_encode(['message'=&gt;'Done!','Id'=&gt;200,'Response'=&gt;'']);
              }
              catch(Exception $e)
              {
                  return json_encode(['message'=&gt;'Not Allowed!','Id'=&gt;402,'Response'=&gt;'']);
              }
              }
              else
              {
              return json_encode(['message'=&gt;'No Pic!','Id'=&gt;404,'Response'=&gt;'']);
          }
          }
  </code></pre>