diff --git a/src/CliCommand/SitesDisable.php b/src/CliCommand/SitesDisable.php new file mode 100644 index 00000000..3dfb9a84 --- /dev/null +++ b/src/CliCommand/SitesDisable.php @@ -0,0 +1,50 @@ +mvcFactory->makeTempModel('Sites'); + + $id = intval($input->getArgument('id')); + + $model + ->findOrFail($id) + ->unpublish(); + + return Command::SUCCESS; + } + + protected function configure(): void + { + $this + ->addArgument('id', InputArgument::REQUIRED, 'The numeric site ID to disable'); + } + +} \ No newline at end of file diff --git a/src/CliCommand/SitesEnable.php b/src/CliCommand/SitesEnable.php new file mode 100644 index 00000000..9bd048e0 --- /dev/null +++ b/src/CliCommand/SitesEnable.php @@ -0,0 +1,50 @@ +mvcFactory->makeTempModel('Sites'); + + $id = intval($input->getArgument('id')); + + $model + ->findOrFail($id) + ->publish(); + + return Command::SUCCESS; + } + + protected function configure(): void + { + $this + ->addArgument('id', InputArgument::REQUIRED, 'The numeric site ID to enable'); + } + +} \ No newline at end of file