title: file_get_contents not working in a controller
body: <p>I am trying to receive file from android app created with nativescript using <code>nativescript-background-http</code> and the content-type is set as application/octet-stream.</p>
  
  <p>therefore I am using file_get_contents to receive file in PHP.</p>
  
  <p>this code works fine outside the laravel controller. </p>
  
  <pre><code>file_put_contents('uploads/' . $_SERVER['HTTP_FILENAME'], file_get_contents('php://input'));
  </code></pre>
  
  <p>I had added this to the .htaccess</p>
  
  <pre><code>RewriteCond %{HTTP:File-Name} .
      RewriteRule .* - [E=HTTP_FILENAME:%{HTTP:File-Name}]
  </code></pre>
  
  <p>but once I move the code into my controller it doesn't work</p>
  
  <pre><code>public function createDocument(Request $request){
          file_put_contents('assets/atlantis/uploads/documents/' . $_SERVER['HTTP_FILENAME'], file_get_contents('php://input'));
      }
  </code></pre>
  
  <p>Please any suggestions why it wouldn't work inside laravel controller?
  What can I do to fix this.</p>
  
  <p>Thanks</p>