title: laravel download a newly created xmlfile
body: <p>I am trying to create xmlfile and download it from my program but it isnt working very well.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$xml = new SimpleXMLElement('&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;mydoc&gt;&lt;/mydoc&gt;');
  
      $xml-&gt;addAttribute('version', '1.0');
      $xml-&gt;addChild('datetime', date('Y-m-d H:i:s'));
  
      $person = $xml-&gt;addChild('person');
      $person-&gt;addChild('firstname', 'Someone');
      $person-&gt;addChild('secondname', 'Something');
      $person-&gt;addChild('telephone', '123456789');
      $person-&gt;addChild('email', 'me@something.com');
  
      $address = $person-&gt;addchild('address');
      $address-&gt;addchild('homeaddress', 'Andersgatan 2, 432 10 Göteborg');
      $address-&gt;addChild('workaddress', 'Andersgatan 3, 432 10 Göteborg');
  
      $xml-&gt;saveXML('test.xml');
  
      $response = Response::make($xml-&gt;asXML(), 200);
      $response-&gt;header('Content-Type', 'text/xml');
  
      return $response;
  </code></pre>
  
  <p>This is showing the xmlfile in my browser, but i want a popup to appear, asking me to download the file i just created. I tried it with Response::download() to but that isnt working neither because the first parameter should be the path to the file then.</p>
  
  <p>Any help would be appreciated.</p>