Files
ladill-transfer/app/Console/Commands/ProcessTransferBillingCommand.php
T
isaaccladandCursor 4b616a7f04
Deploy Ladill Transfer / deploy (push) Successful in 47s
Simplify recipient emails and add live upload progress on create.
Recipients always get the download link immediately when an email is set.
Large files upload in the background with per-file and overall progress bars.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-08 13:25:43 +00:00

33 lines
934 B
PHP

<?php
namespace App\Console\Commands;
use App\Services\Transfer\TransferBillingService;
use App\Services\Transfer\TransferOwnerMailService;
use Illuminate\Console\Command;
class ProcessTransferBillingCommand extends Command
{
protected $signature = 'transfer:process-billing';
protected $description = 'Renew monthly transfer storage billing and delete transfers past the grace period';
public function handle(
TransferBillingService $billing,
TransferOwnerMailService $owners,
): int {
$result = $billing->processDueRenewals();
$ownerEmails = $owners->processGraceReminders();
$this->info(sprintf(
'Transfer billing: %d renewed, %d entered grace, %d deleted, %d owner grace reminders.',
$result['renewed'],
$result['graced'],
$result['deleted'],
$ownerEmails,
));
return self::SUCCESS;
}
}