moon ledger functionality

This commit is contained in:
2020-04-26 00:04:17 -05:00
parent 4fa31759c3
commit a5a894e6d6

View File

@@ -118,7 +118,7 @@ class MoonLedgerController extends Controller
$sortTime = Carbon::now()->subDays(30); $sortTime = Carbon::now()->subDays(30);
$current = Carbon::createFromFormat('Y-m-d', $ledger->last_updated); $current = Carbon::createFromFormat('Y-m-d', $ledger->last_updated);
if($current->greaterThanOrEqualTo($sortTime)) { if($current->greaterThanOrEqualTo($sortTime)) {
array_push($tempMiningLedger, [ array_push($miningLedgers, [
'structure' => $value, 'structure' => $value,
'character' => $charInfo->name, 'character' => $charInfo->name,
'corpTicker' => $corpInfo->ticker, 'corpTicker' => $corpInfo->ticker,
@@ -128,12 +128,11 @@ class MoonLedgerController extends Controller
]); ]);
} }
} }
//Store the ledger permanently by structure name
array_push($miningLedgers, $tempMiningLedger);
} }
} }
dd($miningLedgers);
return view('moons.ledger.corpmoons')->with('miningLedgers', $miningLedgers) return view('moons.ledger.corpmoons')->with('miningLedgers', $miningLedgers)
->with('structures', $structures); ->with('structures', $structures);
} }