diff options
author | Fbenas <philbeansburton@gmail.com> | 2020-06-21 17:58:23 +0100 |
---|---|---|
committer | Fbenas <philbeansburton@gmail.com> | 2020-06-21 17:58:23 +0100 |
commit | 9cd0234665ea66dff172d94b9c1b4cb61b1d25b1 (patch) | |
tree | 9cb5d13acbf3c5bb8c842620ceb8a104b41babb7 /app/Console/Commands/ScrapeFile.php | |
parent | 8d6e8b306d7836e4075a13ad98617bfe5afaa1a0 (diff) |
Diffstat (limited to 'app/Console/Commands/ScrapeFile.php')
-rw-r--r-- | app/Console/Commands/ScrapeFile.php | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/app/Console/Commands/ScrapeFile.php b/app/Console/Commands/ScrapeFile.php index 45beda9..564cf00 100644 --- a/app/Console/Commands/ScrapeFile.php +++ b/app/Console/Commands/ScrapeFile.php @@ -9,35 +9,9 @@ use Illuminate\Support\Facades\Storage; class ScrapeFile extends Command { - /** - * The name and signature of the console command. - * - * @var string - */ protected $signature = 'scrape:file { filename }'; - - /** - * The console command description. - * - * @var string - */ protected $description = 'Scrape a file for data'; - /** - * Create a new command instance. - * - * @return void - */ - public function __construct() - { - parent::__construct(); - } - - /** - * Execute the console command. - * - * @return mixed - */ public function handle() { $filename = $this->argument('filename'); @@ -48,12 +22,11 @@ class ScrapeFile extends Command } $raw_data = Storage::disk('local')->get($filename); + $tournament_name = 'Six Nations ' . explode('-', explode('.txt', $filename)[0])[1]; - $service = new Service(new SixnationsrugbyAdapter($raw_data, 'Six Nations ' . explode('-', explode('.txt', $filename)[0])[1])); - + $service = new Service(new SixnationsrugbyAdapter($raw_data, $tournament_name)); $service->save(); return Command::SUCCESS; } - } |