argument('url'); $format = $this->argument('format'); $service = new Service($url, $this->output); if ($format == 'video') { $service->downloadVideo('video'); } elseif ($format == 'audio') { $service->downloadAudio('audio'); } $video_model = Video::create( [ 'path' => $service->getFullPath() ] ); $this->info('Download of ' . $service->getTitle() . ' complete!'); return Command::SUCCESS; } }