diff options
Diffstat (limited to 'app/Console/Commands/SaveStats.php')
| -rw-r--r-- | app/Console/Commands/SaveStats.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/Console/Commands/SaveStats.php b/app/Console/Commands/SaveStats.php new file mode 100644 index 0000000..3466812 --- /dev/null +++ b/app/Console/Commands/SaveStats.php @@ -0,0 +1,37 @@ +<?php + +namespace App\Console\Commands; + +use Illuminate\Console\Command; +use App\Libraries\Background; + +class SaveStats extends Command +{ + /** + * The name and signature of the console command. + * + * @var string + */ + protected $signature = 'anime:saveStats'; + + /** + * The console command description. + * + * @var string + */ + protected $description = 'Daily task to save Stats'; + + /** + * Execute the console command. + * + * @return int + */ + public function handle() + { + $background = new Background(); + if ( $background->saveAnimeStats() ) { + return Command::SUCCESS; + } + return Command::FAILURE; + } +} |
