title: storing files to aws s3 using laravel
body: <p>Please give me an example to store files to AWS S3 in laravel 5.5.
  I already configured filesystem file with AWS credentials. </p>
  
  <p>I saw the function </p>
  
  <p><code>Storage::put('file.jpg', $contents);</code></p>
  
  <p>but don't know what the second parameter is</p>
  
  <p>the contents of filesystem.php file is as follows</p>
  
  <pre><code>return [
  
  
      'default' =&gt; env('FILESYSTEM_DRIVER', 'local'),
  
  
  
      'cloud' =&gt; env('FILESYSTEM_CLOUD', 's3'),
  
  
      'disks' =&gt; [
  
          'local' =&gt; [
              'driver' =&gt; 'local',
              'root' =&gt; storage_path('app'),
          ],
  
          'public' =&gt; [
              'driver' =&gt; 'local',
              'root' =&gt; storage_path('app/public'),
              'url' =&gt; env('APP_URL').'/storage',
              'visibility' =&gt; 'public',
          ],
  
          's3' =&gt; [
              'driver' =&gt; 's3',
              'key' =&gt; '*********',
              'secret' =&gt; '******',
              'region' =&gt; 'my region',
              'bucket' =&gt; 'bucketname',
          ],
  
      ],
  
  ];
  </code></pre>
  
  <p>thanks in advance</p>