Deploy Ladill Transfer / deploy (push) Successful in 47s
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>
33 lines
934 B
PHP
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;
|
|
}
|
|
}
|