Add wallet auto-withdraw threshold support for Ladill Mini.
Deploy Ladill Mini / deploy (push) Failing after 42s
Deploy Ladill Mini / deploy (push) Failing after 42s
Store per-user auto-withdraw amounts, expose them via the wallet API, and process withdrawals when balances reach the configured threshold after payments or on a schedule. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Services\Mini\AutoWithdrawService;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ProcessAutoWithdrawals extends Command
|
||||
{
|
||||
protected $signature = 'mini:process-auto-withdrawals';
|
||||
|
||||
protected $description = 'Withdraw wallet balances that have reached each user\'s auto-withdraw threshold.';
|
||||
|
||||
public function handle(AutoWithdrawService $autoWithdraw): int
|
||||
{
|
||||
$count = $autoWithdraw->processAll();
|
||||
$this->info("Processed {$count} auto-withdrawal(s).");
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user