add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
@@ -9,7 +9,6 @@ use Illuminate\Console\Command;
class SendMonthlyPaymentNotificationsCommand extends Command
{
protected $signature = 'payments:monthly-reminder {--force} {--email=} {--type=}';
protected $description = 'Send monthly payment reminders on the first Saturday of every month.';
public function handle(PaymentNotificationService $service): int
@@ -20,9 +19,8 @@ class SendMonthlyPaymentNotificationsCommand extends Command
if ($email !== '') {
$user = User::query()->where('email', $email)->first();
if (! $user) {
if (!$user) {
$this->error('Invalid --email provided.');
return self::FAILURE;
}
@@ -32,14 +30,12 @@ class SendMonthlyPaymentNotificationsCommand extends Command
'force' => true,
]);
$this->info('Test reminder sent for '.$email.'.');
$this->info('Test reminder sent for ' . $email . '.');
return $result['failed'] > 0 ? self::FAILURE : self::SUCCESS;
}
if (! $force && ! $this->isFirstSaturday(now())) {
if (!$force && !$this->isFirstSaturday(now())) {
$this->info('Not the first Saturday of the month. Use --force to override.');
return self::SUCCESS;
}