app/Console/Commands/DownloadManager.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        if(! is_dir('./downloads') ) mkdir('./downloads');
        $links = collect($this->urls);
        $bar = $this->output->createProgressBar( $links->count() );
        $this->info('Download Status:');
        $links->each(function($link, $key) use($bar){
            $this->download('./downloads/'.$key . '.mp4', $link);
            $bar->advance();
        });
        $bar->finish(); $this->info('');
        $this->info('Now Zipping(tar):');
        $this->zipDir();
        $this->info('Done!!!');
    }
public function handle ( ) { if ( ! is_dir ( './downloads' ) ) mkdir ( './downloads' ) ; $ links = collect ( $ this -> urls ) ; $ bar = $ this -> output -> createProgressBar ( $ links -> count ( ) ) ; $ this -> info ( 'Download Status:' ) ; $ links -> each ( function ( $ link , $ key ) use ( $ bar ) { $ this -> download ( './downloads/' . $ key . '.mp4' , $ link ) ; $ bar -> advance ( ) ; } ) ; $ bar -> finish ( ) ; $ this -> info ( '' ) ; $ this -> info ( 'Now Zipping(tar):' ) ; $ this -> zipDir ( ) ; $ this -> info ( 'Done!!!' ) ; }
Execute the console command.
Execute the console command .