Q:

Download and storing file remotelly

im trying to download a remote xml file, but is not working, is not storing the file on my storage.
my code:
$url = 'http://xml.url.xml';

        set_time_limit(0);

        // Download file and save it on folder

        $guzzleClient = new Client();
        $response = $guzzleClient->get($url);
        $body = $response->getBody();
        $body->seek(0);
        $size = $body->getSize();
        $file = $body->read($size);

        Storage::download($file);

A:

The Storage::download() method is used to generate response, that will force the download in the browser. 
Use Storage::put('filename.xml', $content) instead.
You can read more in the docs:
https://laravel.com/docs/5.6/filesystem

