private function getZip()
    {
        $this->info("Downloading");

        $sourceContent = file_get_contents($this->argument('source'));
        if(!$sourceContent) {
            throw new \Exception('Source could not be found!');
        }

        $this->tmpRandomName = time();
        $this->tmpZipFile = tmpPath($this->tmpRandomName.'.zip');

        // Save zip to tmp directory
        if(!file_put_contents($this->tmpZipFile, $sourceContent)) {
            File::delete($this->tmpZipFile);
            throw new \Exception('Could not copy source file to path '.$this->tmpZipFile);
        }

        return $this;
    }
private function getZip()
    {
        $this->info("Downloading");

        $sourceContent = file_get_contents($this->argument('source'));
        if(!$sourceContent) {
            throw new \Exception('Source could not be found!');
        }

        $this->tmpRandomName = time();
        $this->tmpZipFile = tmpPath($this->tmpRandomName.'.zip');

        // Save zip to tmp directory
        if(!file_put_contents($this->tmpZipFile, $sourceContent)) {
            File::delete($this->tmpZipFile);
            throw new \Exception('Could not copy source file to path '.$this->tmpZipFile);
        }

        return $this;
    }
private function getZip ( ) { $ this -> info ( "Downloading" ) ; $ sourceContent = file_get_contents ( $ this -> argument ( 'source' ) ) ; if ( ! $ sourceContent ) { throw new \ Exception ( 'Source could not be found!' ) ; } $ this -> tmpRandomName = time ( ) ; $ this -> tmpZipFile = tmpPath ( $ this -> tmpRandomName . '.zip' ) ; // Save zip to tmp directory if ( ! file_put_contents ( $ this -> tmpZipFile , $ sourceContent ) ) { File :: delete ( $ this -> tmpZipFile ) ; throw new \ Exception ( 'Could not copy source file to path ' . $ this -> tmpZipFile ) ; } return $ this ; }
Get zip from source

@return $this
@throws \Exception
Get zip from source