diff options
| author | horus | 2022-11-17 19:57:52 +0100 |
|---|---|---|
| committer | horus | 2022-11-17 19:57:52 +0100 |
| commit | f4d0db3c67127919f431459aa1e430cab4e6d380 (patch) | |
| tree | 8d3cb288ccac34e108350543352fafc953d7ebe4 /app/Console/Commands/SaveTopAnimeEnhance.php | |
| parent | f2e76ff110f531703f2c4f400e1fa285ee05ad94 (diff) | |
| download | senpai-f4d0db3c67127919f431459aa1e430cab4e6d380.tar.gz | |
Change scheduler from closures to artisan commands
Diffstat (limited to 'app/Console/Commands/SaveTopAnimeEnhance.php')
| -rw-r--r-- | app/Console/Commands/SaveTopAnimeEnhance.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/app/Console/Commands/SaveTopAnimeEnhance.php b/app/Console/Commands/SaveTopAnimeEnhance.php new file mode 100644 index 0000000..f46602b --- /dev/null +++ b/app/Console/Commands/SaveTopAnimeEnhance.php @@ -0,0 +1,43 @@ +<?php + +namespace App\Console\Commands; + +use Illuminate\Console\Command; +use App\Libraries\Background; + +class SaveTopAnimeEnhance extends Command +{ + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'anime:saveTopAnimeEnhance'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Save top/popular anime, enhancements and season details'; + + /** + * Execute the console command. + * + * @return int + */ + public function handle() + { + $background = new Background(); + echo "saveTopAnime()\n"; + $background->saveTopAnime(); + echo "saveTopAnimeByPopularity()\n"; + $background->saveTopAnimeByPopularity(); + echo"saveEnhancementForAll()\n"; + $background->saveEnhancementForAll(); + echo "addSeasonToAllAnime()\n"; + $background->addSeasonToAllAnime(); + + return Command::SUCCESS; + } +} |
