summaryrefslogtreecommitdiff
path: root/app/Console/Commands/SetWatchingCalender.php
diff options
context:
space:
mode:
authorhorus2022-11-17 19:57:52 +0100
committerhorus2022-11-17 19:57:52 +0100
commitf4d0db3c67127919f431459aa1e430cab4e6d380 (patch)
tree8d3cb288ccac34e108350543352fafc953d7ebe4 /app/Console/Commands/SetWatchingCalender.php
parentf2e76ff110f531703f2c4f400e1fa285ee05ad94 (diff)
downloadsenpai-f4d0db3c67127919f431459aa1e430cab4e6d380.tar.gz
Change scheduler from closures to artisan commands
Diffstat (limited to 'app/Console/Commands/SetWatchingCalender.php')
-rw-r--r--app/Console/Commands/SetWatchingCalender.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/app/Console/Commands/SetWatchingCalender.php b/app/Console/Commands/SetWatchingCalender.php
new file mode 100644
index 0000000..9e4bfa7
--- /dev/null
+++ b/app/Console/Commands/SetWatchingCalender.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace App\Console\Commands;
+
+use Illuminate\Console\Command;
+use App\Libraries\Helper;
+
+class SetWatchingCalender extends Command
+{
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'anime:setWatchingCalender';
+
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = 'Update anime to set watching status and populate calendar entries';
+
+ /**
+ * Execute the console command.
+ *
+ * @return int
+ */
+ public function handle()
+ {
+ $helper = new Helper();
+ #$helper->createUser( 'll-' );
+ echo "setIsWatchingForAll(): \n";
+ $helper->setIsWatchingForAll();
+ echo "\nsetCalendarForAll(): \n";
+ $helper->setCalendarForAll();
+
+ return Command::SUCCESS;
+
+ }
+}