title: How can i download the files from s3 bucket to local directory using Laravel
body: <p>I currently confuse why my exec command for downloading the files from s3 to local directory, not working on laravel, however in AWS command line interface, the command that I created is downloading and working well. please see the reference that I attach below.</p>
  
  <p><a href="https://i.stack.imgur.com/mshRP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mshRP.png" alt="AWS Command Interface"></a></p>
  
  <p>I have here my sample code that I created on my public function</p>
  
  <p><strong>Function:</strong></p>
  
  <pre><code>public function send_zip_files_to_store() {
  
      $source = 's3://compexp/11-10-2019/01790exp.zip';
      $destination = 'C:\xampp\htdocs';
      exec('aws cp sync ' . $source . ' ' . $destination);
  
  }
  </code></pre>
  
  <p><strong>Route:</strong></p>
  
  <pre><code>Route::get('/send_zip_files_to_store','DashController@send_zip_files_to_store')-&gt;name('send_zip_files_to_store');
  </code></pre>