testing new mining tax

This commit is contained in:
2021-05-25 01:42:48 +09:00
parent 8153235f1f
commit da95ee481d

View File

@@ -76,21 +76,16 @@ class TestController extends Controller
//Declare variables //Declare variables
$mailDelay = 15; $mailDelay = 15;
$config = config('esi'); $config = config('esi');
$mains = array();
//Get the users from the database //Get the users from the database
$mains = User::all(); $mains = User::all();
//Pluck all the users from the database of ledgers to determine if they are mains or alts. //Pluck all the users from the database of ledgers to determine if they are mains or alts.
$tempMains = Ledger::where([ $mains = Ledger::where([
'invoiced' => 'Yes', 'invoiced' => 'Yes',
])->where('last_updated', '>', Carbon::now()->subMonths(3))->pluck('character_id'); ])->where('last_updated', '>', Carbon::now()->subMonths(3))->pluck('character_id');
foreach($tempMains as $main) { $mains = $mains->unique()->values()->all();
if(!isset($mains[$main])) {
$mains[$main] = $main;
}
}
dd($mains); dd($mains);