From eed515e73b053d99fad634a310bb662a948cb302 Mon Sep 17 00:00:00 2001 From: Andrey Helldar Date: Sat, 4 Oct 2025 23:17:33 +0300 Subject: [PATCH] Add `shouldRun` method to restrict webhook registration to production --- operations/2024_01_01_0000_register_webhook.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/operations/2024_01_01_0000_register_webhook.php b/operations/2024_01_01_0000_register_webhook.php index 42c31a5..5548721 100644 --- a/operations/2024_01_01_0000_register_webhook.php +++ b/operations/2024_01_01_0000_register_webhook.php @@ -16,6 +16,11 @@ public function needBefore(): bool return false; } + public function shouldRun(): bool + { + return app()->isProduction(); + } + public function __invoke(): void { $this->artisan(RegisterWebhooks::class);