mining operations

This commit is contained in:
2021-06-04 00:20:42 +09:00
parent 9ad22c03a8
commit 254931998c

View File

@@ -55,12 +55,14 @@ class ProcessAllianceMiningOperations implements ShouldQueue
{ {
$count = MiningOperation::where([ $count = MiningOperation::where([
'processed' => 'No', 'processed' => 'No',
])->count() ])->where('operation_date', '<=', Carbon::now())
->count()
if($count > 0) { if($count > 0) {
$operations = MiningOperation::where([ $operations = MiningOperation::where([
'processed' => 'No', 'processed' => 'No',
])->get(); ])->where('operation_date', '<=', Carbon::now())
->get();
foreach($operations as $operation) { foreach($operations as $operation) {
$ledgers = Ledger::where([ $ledgers = Ledger::where([