From 42daae10c61562718aec4f16d939907e89a91253 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 11 Sep 2023 20:51:31 +0200 Subject: [PATCH] feat: able to invite more people at once --- app/Console/Commands/WaitlistInvite.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/WaitlistInvite.php b/app/Console/Commands/WaitlistInvite.php index 61d0bac18..dd629d706 100644 --- a/app/Console/Commands/WaitlistInvite.php +++ b/app/Console/Commands/WaitlistInvite.php @@ -19,7 +19,7 @@ class WaitlistInvite extends Command * * @var string */ - protected $signature = 'waitlist:invite {email?} {--only-email}'; + protected $signature = 'waitlist:invite {--people=1} {--only-email} {email?}'; /** * The console command description. @@ -33,6 +33,12 @@ class WaitlistInvite extends Command */ public function handle() { + $people = $this->option('people'); + for ($i = 0; $i < $people; $i++) { + $this->main(); + } + } + private function main() { if ($this->argument('email')) { if ($this->option('only-email')) { $this->next_patient = User::whereEmail($this->argument('email'))->first();