diff --git a/app/Console/Commands/Data/Test.php b/app/Console/Commands/Data/Test.php index 9bc99a8c5..e1c1e8362 100644 --- a/app/Console/Commands/Data/Test.php +++ b/app/Console/Commands/Data/Test.php @@ -5,17 +5,13 @@ namespace App\Console\Commands\Data; use Illuminate\Console\Command; use Log; use Carbon\Carbon; - -//Models -use App\Models\ScheduledTask\ScheduleJob; -use App\Jobs\Commands\Eve\SendEveMail; - -//Library -use Seat\Eseye\Exceptions\RequestFailedException; +use Illuminate\Support\Collection; +use Illuminate\Support\Str; +use App\Library\Helpers\LookupHelper; use App\Library\Esi\Esi; -use Seat\Eseye\Cache\NullCache; -use Seat\Eseye\Configuration; -use App\Library\Helpers\FinanceHelper; +use App\Library\Moons\MoonCalc; +use App\Models\MoonRental\AllianceMoon; +use App\Models\MoonRental\AllianceMoonOre; class Test extends Command { @@ -50,39 +46,24 @@ class Test extends Command */ public function handle() { - $esiHelper = new Esi; - $config = config('esi'); + //Declare variables + $lookup = new LookupHelper; + $mHelper = new MoonCalc; + $months = 3; + $rentalTax = 0.25; + $worth1; + $worth2; - $refreshToken = $esiHelper->GetRefreshToken($config['primary']); - $esi = $esiHelper->SetupEsiAuthentication($refreshToken); + $moons = AllianceMoon::all(); - $recipient = $config['primary']; - $recipientType = 'character'; - $subject = "Just A Test for Eseye"; - $sender = $config['primary']; - $body = "F0KlvSA9vrXWYK0IuMhSAbfaOAMmQO5U2CD69Dn0JOk26B8HnSPPkhSG3JzlawHjbBd16HAIbaawbv9304EaoTRctpu5cnZo0GoHINi3R7pNGi0IZTWKG4EArwWbSujwX9KPvMqGNbcSorrIEslw6neXWW1kcDN0GMcvV6SeoM23cSkK33cAbR4DTeqUXZ9ULuFy31UPXfEcaNzKREbqKPlgChYcGdCyHG1J25qrEmPlOTPI1NQQkh71HvHJTVA7bmTgLEJMdFYHbc3ZzGOB9RFLfhdkGEGl2f3OQNyDAJIKW2mNQVlRVGc3Emvm42czpsH8ojn3BX5nuEFxNfjgue8hhdBIZSKm232U2l0xsPGZOzHvQdYs8bLw7ZQX1drV9qOPnbhgzbFLxEvQoGDquhKAdlo7bhkgoCn5IiY3BbQ5qnKVodymb58gj9Pd67GxjJ8K0854c91KkrJNEOCyiVcqKYqNDtKkB7hgjBLZUKRtWUkOf9j1qIRARoGzTGdqK20yvfaVIWetVqjw5UvzQC2pynHkvIw2X3aD49ghY7UOzXUceKJ8taF4ZaMvW34r5OvyTrjVo4PKV9TylIODmzg1U0s4joxz58f1A6BNp2fCs1YzNOObuMaxGjek47jv2gDgyhQnmi5uaREcGn5AAwgMUc55GPY2jevRTHo9scMqm5amaJUBQ3TgXvFSfS33LxD8xJjdKw7KB06stDQzdjyVb52mAdm5WchOOpGy3EXntBSzsfUHc4XEqql7lKTPLgBzeYxt9EagGP96Li4dABg2MaLuU4i1CWdV49ZdPwOt1OjwNU4QtfR02C6Vw7raCFl3mqWBgLke9O5dC8Lh3ojg7FBATstSuur2n41Rn4YwzGaiWJ3qKwTsJGL3k8PaHEsvwvq56w4Qjt8CqJsmAV1nsfKMFZaVlcbK3PFN5oHaDbQwDh4IVdwA8UPPnrn2wSuugi8QlVyUA8z9iVYMW8OdzHFn98zl7a2Bua5M"; + foreach($moons as $moon) { + //Declare the arrays needed + $ores = array(); - SendEveMail::dispatch($body, $recipient, $recipientType, $subject, $sender); + $ores = AllianceMoonOre::where([ + 'moon_id' => $moon->moon_id, + ])->get(['ore_id', 'quantity'])->toArray(); - /* - try { - $response = $esi->setBody([ - 'approved_cost' => 100, - 'body' => "Welcome to this test message.
" . $body, - 'recipients' => [[ - 'recipient_id' => $config['primary'], - 'recipient_type' => 'character', - ]], - 'subject' => 'Just a Test', - ])->invoke('post', '/characters/{character_id}/mail/', [ - 'character_id' => $config['primary'], - ]); - } catch(RequestFailedException $e) { - return null; } - - var_dump($response); - dd($response->getErrorCode()); - */ } } diff --git a/app/Http/Controllers/Test/TestController.php b/app/Http/Controllers/Test/TestController.php index cf9cfa134..ef897e6ff 100644 --- a/app/Http/Controllers/Test/TestController.php +++ b/app/Http/Controllers/Test/TestController.php @@ -36,31 +36,6 @@ class TestController extends Controller return view('test.char.display')->with('char', $char); } - public function TestAllianceMoonWorth() { - //Declare variables - $lookup = new LookupHelper; - $mHelper = new MoonCalc; - $months = 3; - $rentalTax = 0.25; - $worth1; - $worth2; - - $moons = AllianceMoon::all(); - - foreach($moons as $moon) { - //Declare the arrays needed - $ores = array(); - - $ores = AllianceMoonOre::where([ - 'moon_id' => $moon->moon_id, - ])->get(['ore_id', 'quantity'])->toArray(); - - return view('test.moonworth.moon')->with('ores', $ores); - } - - - } - public function DebugMiningTaxesInvoices() { $lookup = new LookupHelper; $ledgers = new Collection; diff --git a/routes/web.php b/routes/web.php index de4776417..7134ac12b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -150,8 +150,7 @@ Route::group(['middleware' => ['auth']], function(){ Route::get('/test/char/display', 'Test\TestController@displayCharTest'); Route::get('/test/miningtax/invoice', 'Test\TestController@DebugMiningTaxesInvoices'); Route::get('/test/miningtax/observers', 'Test\TestController@DebugMiningObservers'); - Route::get('/test/moon/worth', 'Test\TestController@TestAllianceMoonWorth'); - + }); ?> \ No newline at end of file