diff --git a/.env.example b/.env.example index 0a10214..228e700 100644 --- a/.env.example +++ b/.env.example @@ -67,9 +67,16 @@ VITE_APP_NAME="${APP_NAME}" EVEONLINE_CLIENT_ID=replace_this_with_eve_developer_client_id EVEONLINE_CLIENT_SECRET=replace_this_with_eve_developer_secret_key EVEONLINE_REDIRECT_URL=replace_this_with_eve_developer_redirect_uri +ESI_USERAGENT="${APP_NAME}" +ESI_PRIMARY_CHAR=replace_with_character_id_of_ceo +ESI_CORPORATION=replace_with_corporation_id +ESI_ALLIANCE=replace_with_alliance_id +PUBLIC_MINING_TAX=0.15 +MINING_TAX=0.15 +REFINE_RATE=0.7948248 +EVE_MAIL_ENABLED=false JWT_SECRET=replace_this_with_a_long_random_secret JWT_TTL=3600 JWT_ISSUER="${APP_NAME}" JWT_REFRESH_INTERVAL=3600 - diff --git a/.gitignore b/.gitignore index b71b1ea..e8c17ba 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ Homestead.json Homestead.yaml Thumbs.db +composer.lock diff --git a/app/Http/Controllers/Dashboard/DashboardController.php b/app/Http/Controllers/Dashboard/DashboardController.php index 6ace7e7..6552e70 100644 --- a/app/Http/Controllers/Dashboard/DashboardController.php +++ b/app/Http/Controllers/Dashboard/DashboardController.php @@ -7,6 +7,10 @@ use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; +use Asantibanez\LivewireCharts\LivewireCharts; +use Asantibanez\LivewireCharts\RadarChartModel; +use Asantibanez\LivewireCharts\TreeMapChartModel; +use Livewire\Component; use Carbon\Carbon; //Application Library @@ -23,24 +27,41 @@ use App\Models\Esi\EsiToken; use App\Models\Auth\UserPermission; use App\Models\Auth\UserRole; use App\Models\Auth\User; +use App\Models\Auth\UserAlt; -class DashboardController extends Controller +class DashboardController extends Controller implements HasMiddleware { - public function __construct() { - //$this->middleware('auth'); - //$this->middleware('role:User'); + /** + * Get the middleware that should be assigned to the controller + */ + public static function middleware() : array { + return [ + new Middleware('auth'); + new Middleware('role:User'); + ]; } public function displayDashboard() { - $esiToken = new EsiToken; + $altCount = null; + $alts = null; + $esiHelper = new Esi; + $config = config('esi'); - $esi = new Eseye(); - //dd($esi); - $characterInfo = $esi->invoke('get', '/characters/{character_id}/', [ - 'character_id' => 92471016, + $roleEntry = UserRole::where([ + 'character_id' => auth()->user()->character_id, ]); - dd($characterInfo); + $role = $roleEntry->role; + + /** + * Alt Counts + */ + $altCount = UserAlt::where([ + 'main_id' => auth()->user()->character_id, + ])->count(); + + - return view('dashboard.dashboard')->with(['characterId' => $esiToken->refresh_token]); + return view('dashboard.dashboard')->with('altCount', $altCount) + ->with('role', $role); } } diff --git a/app/Library/Esi/Esi.php b/app/Library/Esi/Esi.php index b332150..4e5ad62 100644 --- a/app/Library/Esi/Esi.php +++ b/app/Library/Esi/Esi.php @@ -42,15 +42,17 @@ class Esi { //Check for an esi scope $check = EsiScope::where(['character_id' => $charId, 'scope' => $scope])->count(); if($check == 0) { - //Compose a mail to send to the user if the scope is not found - $subject = 'W4RP Services - Incorrect ESI Scope'; - $body = "Please register on https://services.w4rp.space with the scope: " . $scope; + if ($config['eveMailEnabled'] === true) { + //Send a mail about the incorrect scope to the character + $subject = 'Alliance Services - Incorrect ESI Scope'; + $body = 'Please register with the scope: ' . $scope; + SendEveMail::dispatch($body, (int)$charId, 'character', $subject, $config['primary'])->delay(Carbon::now()->addSeconds(5)); + } - SendEveMail::dispatch($body, (int)$charId, 'character', $subject, $config['primary'])->delay(Carbon::now()->addSeconds(5)); return false; + } else { + return true; } - - return true; } public function DecodeDate($date) { @@ -144,12 +146,9 @@ class Esi { 'inserted_at' => time(), ]); - $newToken = new EsiToken; - $newToken->character_id = $charId; - $newToken->access_token = $body['access_token']; - $newToken->refresh_token = $body['refresh_token']; - $newToken->inserted_at = time(); - $newToken->expires_in = $body['expires_in']; + $newToken = EsiToken::where([ + 'character_id' => $charId, + ])->first(); //Return the new token model return $newToken; diff --git a/app/Library/Helpers/AssetHelper.php b/app/Library/Helpers/AssetHelper.php index 443e2d3..ee40da2 100644 --- a/app/Library/Helpers/AssetHelper.php +++ b/app/Library/Helpers/AssetHelper.php @@ -20,15 +20,101 @@ class AssetHelper { private $charId; private $corpId; - public function __construct($char, $corp) { + public function __construct($char, $corp, $type) { $this->charId = $char; $this->corpId = $corp; - } + $this->type = $type; + } /** - * Get Assets By Page in order to store in the database + * Process Assets + * + * @param $assets */ - public function GetAssetsByPage($page) { + public function ProcessCharacterAssets($assets) { + foreach($assets as $asset) { + Asset::updateOrCreate([ + 'item_id' => $asset->item_id, + ], [ + 'character_id' => $this->charId, + 'is_blueprint_copy' => $asset->is_blueprint_copy, + 'is_singleton' => $asset->is_singleton, + 'item_id' => $asset->item_id, + 'location_flag' => $asset->location_flag, + 'location_id' => $asset->location_id, + 'location_type' => $asset->location_type, + 'quantity' => $asset->quantity, + 'type_id' => $asset->type_id, + ]); + } + } + + /** + * Process Corporation Assets + * + * @param $corporationId + * @param $assets + */ + public function ProcessCorporationAsset($assets) { + foreach($assets as $asset) { + Asset::updateOrCreate([ + 'item_id' => $asset->item_id, + ],[ + 'corporation_id' => $this->corpId, + 'is_blueprint_copy' => $asset->is_blueprint_copy, + 'is_singleton' => $asset->is_singleton, + 'item_id' => $asset->item_id, + 'location_flag' => $asset->location_flag, + 'location_id' => $asset->location_id, + 'location_type' => $asset->location_type, + 'quantity' => $asset->quantity, + 'type_id' => $asset->type_id, + ]); + } + } + + /** + * Get Character Assets by page in order to store in the database + * + * @param $page + */ + public function GetCharacterAssetsByPage($page) { + $esiHelper = new Esi; + + $config = config('esi'); + + $hasScope = $esiHelper->HaveEsiScope($this->charId, 'esi-assets.read_character_assets.v1'); + + if($hasScope == false) { + Log::warning('ESI Scope check for esi-assets.read_character_assets.v1 failed.'); + if($config['eveMailEnabled'] === true) { + //Send a mail about the incorrect scope to the character + $subject = 'Alliance Services - Incorrect ESI Scope'; + $body = 'Please register with the scope: ' . $scope; + SendEveMail::dispatch($body, (int)$charId, 'character', $subject, $config['primary'])->delay(Carbon::now()->addSeconds(5)); + } + } + + $token = $esiHelper->GetRefreshToken($this->charId); + $esi = $esiHelper->SetupEsiAuthentication($token); + + try { + $assets = $esi->page($this->page) + ->invoke('get', '/characters/{character_id}/assets/', [ + 'character_id' => $charId, + ]); + } catch (RequestFailedException $e) { + Log::warning('Failed to get page of character assets from ESI.'); + $assets = null; + } + + return $assets; + } + + /** + * Get Corporation Assets By Page in order to store in the database + */ + public function GetCorporationAssetsByPage($page) { //Declare the variable for the esi helper $esiHelper = new Esi; @@ -59,55 +145,6 @@ class AssetHelper { return $assets; } - - /** - * Store a new asset record in the database - */ - public function StoreNewAsset($asset) { - Asset::updateOrCreate([ - 'item_id' => $asset->item_id, - ], [ - 'is_blueprint_copy' => $asset->is_blueprint_copy, - 'is_singleton' => $asset->is_singleton, - 'item_id' => $asset->item_id, - 'location_flag' => $asset->location_flag, - 'location_id' => $asset->location_id, - 'location_type' => $asset->location_type, - 'quantity' => $asset->quantity, - 'type_id' => $asset->type_id, - ]); - } - - /** - * Purge old data, so we don't run into data issues - */ - public function PurgeStaleData() { - Asset::where('updated_at', '<', Carbon::now()->subDay())->delete(); - } - - /** - * Get the liquid ozone asset - */ - public function GetAssetByType($type, $structureId) { - //See if the row is in the database table - $count = Asset::where([ - 'location_id' => $structureId, - 'type_id' => $type, - 'location_flag' => 'StructureFuel', - ])->count(); - //Get the row if it is in the table - $asset = Asset::where([ - 'location_id' => $structureId, - 'type_id' => $type, - 'location_flag' => 'StructureFuel', - ])->first(); - - if($count == 0) { - return 0; - } else { - return $asset['quantity']; - } - } } ?> \ No newline at end of file diff --git a/app/Library/Helpers/CharacterHelper.php b/app/Library/Helpers/CharacterHelper.php new file mode 100644 index 0000000..e69de29 diff --git a/app/Library/Helpers/CorporationHelper.php b/app/Library/Helpers/CorporationHelper.php new file mode 100644 index 0000000..e69de29 diff --git a/app/Library/Helpers/FinanceHelper.php b/app/Library/Helpers/FinanceHelper.php index e464bb9..a2666ca 100644 --- a/app/Library/Helpers/FinanceHelper.php +++ b/app/Library/Helpers/FinanceHelper.php @@ -16,16 +16,159 @@ use Seat\Eseye\Configuration; //Application Library use App\Library\Esi\Esi; -use App\Library\Helpers\LookupHelper; //Models use App\Models\Finances\AllianceWalletJournal; class FinanceHelper { - public function GetApiWalletJournal($division, $charId) { + public function getCharacterWalletJournalPages($charId): mixed + { + $esiHelper = new Esi; + $token = $esiHelper->GetRefreshToken($charId); + $esi = $esiHelper->SetupEsiAuthentication($token); + $wallet = array(); + + //Check for the correct scope + if(!$esiHelper->HaveEsiScope($charId, 'esi-wallet.read_character_wallet.v1')) { + Log::warning('Scope check failed for esi-wallet.read_character_wallet.v1 for character id: ' . $charId); + return null; + } + + $currentPage = 1 + $totalPages = 1; + $pageFailed = false; + + //Get page by page and add to array + do { + if($esiHelper->TokenExpired($token)) { + $token = $esiHelper->GetRefreshToken($charId); + $esi = $esiHelper->SetupEsiAuthentication($token); + } + try { + $journal = $esi->page($currentPage) + ->invoke('get', '/characters/{character_id}/wallet/journal/', [ + 'character_id' => $charId, + ]); + } catch (RequestFailedException $e) { + Log::warning('Failed to extract page: ' . $currentPage . 'of ' . $totalPages . ' from character journal for character id: ' . $charId); + $pageFailed = true; + } + + //Update the total pages + if($currentPage == 1 && $pageFailed == false) { + $totalPages = $journal->pages; + } + + if($pageFailed == false) { + $tempWallet = json_decode($journal->raw, true); + array_push($wallet, $tempWallet); + } + + //Increment page + $currentPage++; + //Set page failed to false to continue to pull more pages if available. + $pageFailed = false; + } while ($currentPage <= $totalPages); + + return $wallet; + } + + public function insertCharacterWalletJournal($wallet, $charId) { + foreach($wallet as $entry) { + CharacterWalletJournal::updateOrCreate([ + 'id' => $entry['id'], + ], [ + 'character_id' => $charId, + 'amount' => $entry['amount'], + 'balance' => $entry['balance'], + 'context_id' => $entry['context_id'], + 'context_id_type' => $entry['context_id_type'], + 'date' => $esiHelper->DecodeDate($entry['date']), + 'description' => $entry['description'], + 'first_party_id' => $entry['first_party_id'], + 'reason' => $entry['reason'], + 'ref_type' => $entry['ref_type'], + 'second_party_id' => $entry['second_party_id'], + 'tax' => $entry['tax'], + 'tax_receiver_id' ['tax_receiver_id'], + ]); + } + } + + + public function getCharacterWalletJournal($charId) { + $esiHelper = new Esi; + + //Setup the esi container. + $token = $esiHelper->GetRefreshToken($charId); + $esi = $esiHelper->SetupEsiAuthentication($token); + + //check for the correct scope + if(!$esiHelper->HaveEsiScope($charId, 'esi-wallet.read_character_wallet.v1')) { + Log::warning('Scope check failed for esi-wallet.read_character_wallet.v1 for character id: ' . $charId); + return null; + } + + $currentPage = 1; + $totalPages = 1; + $pageFailed = false; + + do { + if($esiHelper->TokenExpired($token)) { + $token = $esiHelper->GetRefreshToken($charId); + $esi = $esiHelper->SetupEsiAuthenticiation($token); + } + + try { + $journal = $esi->page($currentPage) + ->invoke('get', '/characters/{character_id}/wallet/journal/', [ + 'character_id' => $charId, + ]); + } catch (RequestFailedException $e) { + Log::warning('Failed to get wallet journal for character id: ' . $charId); + $pageFailed = true; + } + + if($currentPage == 1 && $pageFailed == false) { + $totalPages = $journal->pages; + } else if($currentPage == 1 && $pageFailed == true) { + return null; + } + + if($pageFailed == false) { + $wallet = json_decode($journal->raw, true); + + foreach ($wallet as $entry) { + CharacterWalletJournal::updateOrCreate([ + 'id' => $entry['id'], + ], [ + 'character_id' => $charId, + 'amount' => $entry['amount'], + 'balance' => $entry['balance'], + 'context_id' => $entry['context_id'], + 'context_id_type' => $entry['context_id_type'], + 'date' => $esiHelper->DecodeDate($entry['date']), + 'description' => $entry['description'], + 'first_party_id' => $entry['first_party_id'], + 'reason' => $entry['reason'], + 'ref_type' => $entry['ref_type'], + 'second_party_id' => $entry['second_party_id'], + 'tax' => $entry['tax'], + 'tax_receiver_id' ['tax_receiver_id'], + ]); + } + } else { + $pageFailed = false; + } + + $curentPage++; + + } while($currentPage <= $totalPages); + } + + public function GetCorporationWalletJournal($division, $charId) { //Declare class variables - $lookup = new LookupHelper; $esiHelper = new Esi; //Setup the esi container. @@ -72,8 +215,6 @@ class FinanceHelper { ]); } catch(RequestFailedException $e) { Log::warning('Failed to get wallet journal page ' . $currentPage . ' for character id: ' . $charId); - Log::warning($e); - dd($e); $pageFailed = true; } @@ -97,14 +238,14 @@ class FinanceHelper { //Foreach journal entry, add the journal entry to the table - foreach($wallet as $entry) { + foreach($wallet as $entry) { //See if we find the entry id in the database already - $found = AllianceWalletJournal::where([ + $found = CorporationWalletJournal::where([ 'id' => $entry['id'], ])->count(); if($found == 0) { - $awj = new AllianceWalletJournal; + $awj = new CorporationWalletJournal; $awj->id = $entry['id']; $awj->corporation_id = $corpId; $awj->division = $division; @@ -154,15 +295,12 @@ class FinanceHelper { //Increment the current page counter $currentPage++; } while($currentPage <= $totalPages); - - return 0; } /** - * Get the pages for the alliance wallet journal + * Get the pages for the corporation wallet journal */ - public function GetAllianceWalletJournalPages($division, $charId) { - $lookup = new LookupHelper; + public function GetCorporationWalletJournalPages($division, $charId) { $esiHelper = new Esi; //Setup the esi container. diff --git a/app/Library/Helpers/ImplantsHelper.php b/app/Library/Helpers/ImplantsHelper.php new file mode 100644 index 0000000..ff53784 --- /dev/null +++ b/app/Library/Helpers/ImplantsHelper.php @@ -0,0 +1,110 @@ +$charId = $char; + $this->esiHelper = new Esi; + $this->config = config('esi'); + + $hasScopeImplants = $esiHelper->HaveEsiScope($this->charId, 'esi-clones.read_implants.v1'); + $hasScopeLocation = $esiHelper->HaveEsiScope($this->charId, 'esi-location.read_location.v1'); + $hasScopeOnline = $esiHelper->HaveEsiScope($this->charId, 'esi-location.read_online.v1'); + $hasScopeShip = $esiHelper->HaveEsiScope($this->charId, 'esi-location.read_ship_type.v1'); + $hasScopeMail = $esiHelper->HaveEsiScope($this->charId, 'esi-mail.send_mail.v1'); + + if($hasScopeImplants == false || $hasScopeLocation == false || $hasScopeOnline == false || $hasScopeShip == false || $hasScopeMail == false) { + if($hasScopeMail == true) { + //Send mail about needing scopes. + $subject = 'Implant Services - Incorrect ESI Scope'; + $body = 'Please register with the following scopes.\r\n esi-clones.read_implants.v1\r\n esi-location.read_location.v1\r\n esi-location.read_online.v1\r\n esi-location.read_ship_type.v1\r\n esi-mail.send_mail.v1\r\n\r\n Sincerely,\r\n Implant Services'; + SendEveMail::dispatch($body, (int)$charId, 'character', $subject, (int)$charId); + } else { + //Send mail from primary config character about scopes. + $subject = 'Implant Services - Incorrect ESI Scope'; + $body = 'Please register with the following scopes.\r\n esi-clones.read_implants.v1\r\n esi-location.read_location.v1\r\n esi-location.read_online.v1\r\n esi-location.read_ship_type.v1\r\n esi-mail.send_mail.v1\r\n\r\n Sincerely,\r\n Implant Services'; + SendEveMail::dispatch($body, (int)$charId, 'character', $subject, $config['primary']); + } + + $this->token = $this->EsiHelper->GetRefreshToken($this->charId); + $this->esi = $this->EsiHelper->SetupEsiAuthentication($this->token); + } + } + + public function ReadCharacterImplants() { + try { + $implants = $esi->invoke('get', '/characters/{character_id}/implants/', [ + 'character_id' => $this->charId, + ]); + } catch (RequestFailedException $e) { + Log::warning('Failed to get implants for character id: ' . $this->charId); + return null; + } + + return $implants; + } + + public function ReadCharacterLocation() { + try { + $location = $esi->invoke('get', '/characters/{character_id}/location/', [ + 'character_id' => $this->charId, + ]); + } catch (RequestFailedException $e) { + Log::warning('Failed to get location for character id: ' . $this->charId); + return null; + } + + return $location; + } + + public function ReadCharacterOnline() { + try { + $online = $esi->invoke('get', '/characters/{character_id}/online/', [ + 'character_id' => $this->charId, + ]); + } catch (RequestFailedException $e) { + Log::warning('Failed to get online status for character id: ' . $this->charId); + return null; + } + + return $online; + } + + public function ReadShipType() { + try { + $ship = $esi->invoke('get', '/characters/{character_id}/ship/', [ + 'character_id' => $this->charId, + ]); + } catch (RequestFailedException $e) { + Log::warning('Failed to get ship for character id: ' . $this->charId); + return null; + } + + return $ship; + } +} \ No newline at end of file diff --git a/app/Models/Auth/UserAlt.php b/app/Models/Auth/UserAlt.php new file mode 100644 index 0000000..2e2ff63 --- /dev/null +++ b/app/Models/Auth/UserAlt.php @@ -0,0 +1,40 @@ +belongsTo('App\Models\Auth\User', 'character_id', 'main_id'); + } + + public function getMain() { + return User::where([ + 'character_id' => $this->main_id + ])->get(); + } +} diff --git a/app/Models/Moon/Config.php b/app/Models/Moon/Config.php new file mode 100644 index 0000000..c5adcb7 --- /dev/null +++ b/app/Models/Moon/Config.php @@ -0,0 +1,28 @@ +name, [ + 'Minerva Arbosa', + 'Lowjack Tzetsu', + 'Amaren Otsada', + ]); + }); + } +} diff --git a/bootstrap/app.php b/bootstrap/app.php index 550dc7d..62fbea0 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,6 +1,5 @@ withMiddleware(function (Middleware $middleware): void { - $middleware->web(append: [ - RefreshUserJwt::class, + $middleware->append([ + \App\Http\Middleware\RedirectIfAuthenticated::class, + \App\Http\Middleware\RequireRole::class, + \App\Http\Middleware\RequirePermission::class, + \App\Http\Middleware\RefreshUserJwt::class, + ]); + + $middleware->alias([ + 'role' => \App\Http\Middleware\RequireRole::class, + 'permission' => \App\Http\Middleware\RequirePermission::class, + ]); + + $middleware->priority([ + \App\Http\Middleware\RedirectIfAuthenticated::class, + \App\Http\Middleware\RequireRole::class, + \App\Http\Middleware\RequriePermission::class, + \App\Http\Middleware\RefreshUserJwt::class, + ]); + + $middleware->appendToGroup('web', [ + \App\Http\Middleware\RedirectIfAuthenticated::class, + \App\Http\Middleware\RequireRole::class, + \App\Http\Middleware\RequirePermission::class, + \App\Http\Middleware\RefreshUserJwt::class, ]); }) ->withExceptions(function (Exceptions $exceptions): void { diff --git a/bootstrap/providers.php b/bootstrap/providers.php index 38b258d..4e3b440 100644 --- a/bootstrap/providers.php +++ b/bootstrap/providers.php @@ -2,4 +2,5 @@ return [ App\Providers\AppServiceProvider::class, + App\Providers\HorizonServiceProvider::class, ]; diff --git a/composer.json b/composer.json index 9dae839..0779ddc 100644 --- a/composer.json +++ b/composer.json @@ -8,14 +8,15 @@ "require": { "php": "^8.4", "asantibanez/livewire-charts": "^4.2", - "drkthunder02/eseye": "^0.2.2", + "drkthunder02/eseye": "^0.3.1", "firebase/php-jwt": "^7.0", "laravel/framework": "^12.0", "laravel/horizon": "^5.44", "laravel/tinker": "^2.10.1", "laravel/ui": "^4.6", "socialiteproviders/eveonline": "^4.4", - "spatie/laravel-prometheus": "^1.5" + "spatie/laravel-prometheus": "^1.5", + "twbs/bootstrap": "^5.3" }, "require-dev": { "barryvdh/laravel-debugbar": "^4.1", diff --git a/composer.lock b/composer.lock index 2b76849..ec8aa37 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ed1ab538768d5bad842767817a3c63bf", + "content-hash": "b957aed9b246442726116ae0f52b4f95", "packages": [ { "name": "asantibanez/livewire-charts", @@ -505,16 +505,16 @@ }, { "name": "drkthunder02/eseye", - "version": "v0.2", + "version": "v0.3.1", "source": { "type": "git", "url": "https://github.com/drkthunder02/eseye.git", - "reference": "80ee401f0c25e84ce47eac5ae14952408ab2c40b" + "reference": "d631eb984d6bc42560c179fcb8faa32b6b9a6ef8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drkthunder02/eseye/zipball/80ee401f0c25e84ce47eac5ae14952408ab2c40b", - "reference": "80ee401f0c25e84ce47eac5ae14952408ab2c40b", + "url": "https://api.github.com/repos/drkthunder02/eseye/zipball/d631eb984d6bc42560c179fcb8faa32b6b9a6ef8", + "reference": "d631eb984d6bc42560c179fcb8faa32b6b9a6ef8", "shasum": "" }, "require": { @@ -522,15 +522,12 @@ "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", + "firebase/php-jwt": "^7.0", "guzzlehttp/guzzle": "^6.2|^7.0", "monolog/monolog": "^3.0", "nesbot/carbon": "^3.0", "php": "^8.1", - "predis/predis": "^1.1", - "web-token/jwt-easy": "^2.1", - "web-token/jwt-signature-algorithm-ecdsa": "^2.1", - "web-token/jwt-signature-algorithm-hmac": "^2.1", - "web-token/jwt-signature-algorithm-rsa": "^2.1" + "predis/predis": "^1.1" }, "require-dev": { "m6web/redis-mock": "^5.0", @@ -561,9 +558,9 @@ ], "description": "A Standalone PHP ESI (EVE Swagger Interface) Client Library. Originally by eveseat/eseye.", "support": { - "source": "https://github.com/drkthunder02/eseye/tree/v0.2" + "source": "https://github.com/drkthunder02/eseye/tree/v0.3.1" }, - "time": "2026-03-12T03:44:32+00:00" + "time": "2026-03-13T06:42:46+00:00" }, { "name": "egulias/email-validator", @@ -632,82 +629,6 @@ ], "time": "2025-03-06T22:45:56+00:00" }, - { - "name": "fgrosse/phpasn1", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/fgrosse/PHPASN1.git", - "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/42060ed45344789fb9f21f9f1864fc47b9e3507b", - "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "~2.0", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "suggest": { - "ext-bcmath": "BCmath is the fallback extension for big integer calculations", - "ext-curl": "For loading OID information from the web if they have not bee defined statically", - "ext-gmp": "GMP is the preferred extension for big integer calculations", - "phpseclib/bcmath_compat": "BCmath polyfill for servers where neither GMP nor BCmath is available" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "FG\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Friedrich Große", - "email": "friedrich.grosse@gmail.com", - "homepage": "https://github.com/FGrosse", - "role": "Author" - }, - { - "name": "All contributors", - "homepage": "https://github.com/FGrosse/PHPASN1/contributors" - } - ], - "description": "A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules.", - "homepage": "https://github.com/FGrosse/PHPASN1", - "keywords": [ - "DER", - "asn.1", - "asn1", - "ber", - "binary", - "decoding", - "encoding", - "x.509", - "x.690", - "x509", - "x690" - ], - "support": { - "issues": "https://github.com/fgrosse/PHPASN1/issues", - "source": "https://github.com/fgrosse/PHPASN1/tree/v2.5.0" - }, - "abandoned": true, - "time": "2022-12-19T11:08:26+00:00" - }, { "name": "firebase/php-jwt", "version": "v7.0.3", @@ -4609,71 +4530,6 @@ }, "time": "2026-03-06T08:39:22+00:00" }, - { - "name": "spomky-labs/base64url", - "version": "v2.0.4", - "source": { - "type": "git", - "url": "https://github.com/Spomky-Labs/base64url.git", - "reference": "7752ce931ec285da4ed1f4c5aa27e45e097be61d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Spomky-Labs/base64url/zipball/7752ce931ec285da4ed1f4c5aa27e45e097be61d", - "reference": "7752ce931ec285da4ed1f4c5aa27e45e097be61d", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.11|^0.12", - "phpstan/phpstan-beberlei-assert": "^0.11|^0.12", - "phpstan/phpstan-deprecation-rules": "^0.11|^0.12", - "phpstan/phpstan-phpunit": "^0.11|^0.12", - "phpstan/phpstan-strict-rules": "^0.11|^0.12" - }, - "type": "library", - "autoload": { - "psr-4": { - "Base64Url\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky-Labs/base64url/contributors" - } - ], - "description": "Base 64 URL Safe Encoding/Decoding PHP Library", - "homepage": "https://github.com/Spomky-Labs/base64url", - "keywords": [ - "base64", - "rfc4648", - "safe", - "url" - ], - "support": { - "issues": "https://github.com/Spomky-Labs/base64url/issues", - "source": "https://github.com/Spomky-Labs/base64url/tree/v2.0.4" - }, - "funding": [ - { - "url": "https://github.com/Spomky", - "type": "github" - }, - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "time": "2020-11-03T09:10:25+00:00" - }, { "name": "symfony/clock", "version": "v8.0.0", @@ -7221,6 +7077,56 @@ }, "time": "2025-12-02T11:56:42+00:00" }, + { + "name": "twbs/bootstrap", + "version": "v5.3.8", + "source": { + "type": "git", + "url": "https://github.com/twbs/bootstrap.git", + "reference": "25aa8cc0b32f0d1a54be575347e6d84b70b1acd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/25aa8cc0b32f0d1a54be575347e6d84b70b1acd7", + "reference": "25aa8cc0b32f0d1a54be575347e6d84b70b1acd7", + "shasum": "" + }, + "replace": { + "twitter/bootstrap": "self.version" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Otto", + "email": "markdotto@gmail.com" + }, + { + "name": "Jacob Thornton", + "email": "jacobthornton@gmail.com" + } + ], + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", + "homepage": "https://getbootstrap.com/", + "keywords": [ + "JS", + "css", + "framework", + "front-end", + "mobile-first", + "responsive", + "sass", + "web" + ], + "support": { + "issues": "https://github.com/twbs/bootstrap/issues", + "source": "https://github.com/twbs/bootstrap/tree/v5.3.8" + }, + "time": "2025-08-26T02:01:02+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v5.6.3", @@ -7378,632 +7284,6 @@ } ], "time": "2024-11-21T01:49:47+00:00" - }, - { - "name": "web-token/jwt-checker", - "version": "v2.2.11", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-checker.git", - "reference": "5f31d98155951739e2fae7455e8466ccddd08f50" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-checker/zipball/5f31d98155951739e2fae7455e8466ccddd08f50", - "reference": "5f31d98155951739e2fae7455e8466ccddd08f50", - "shasum": "" - }, - "require": { - "web-token/jwt-core": "^2.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jose\\Component\\Checker\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-checker/contributors" - } - ], - "description": "Checker component of the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-checker/tree/v2.2.11" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": "web-token/jwt-library", - "time": "2021-03-17T14:55:52+00:00" - }, - { - "name": "web-token/jwt-core", - "version": "v2.2.3", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-core.git", - "reference": "0909efa4fe2c3e2d537922b3ea1b65eb8203686c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-core/zipball/0909efa4fe2c3e2d537922b3ea1b65eb8203686c", - "reference": "0909efa4fe2c3e2d537922b3ea1b65eb8203686c", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "fgrosse/phpasn1": "^2.0", - "php": ">=7.2", - "spomky-labs/base64url": "^1.0|^2.0" - }, - "conflict": { - "spomky-labs/jose": "*" - }, - "require-dev": { - "phpunit/phpunit": "^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "v1.0": "1.0.x-dev", - "v1.1": "1.1.x-dev", - "v1.2": "1.2.x-dev", - "v1.3": "1.3.x-dev", - "v2.0": "2.0.x-dev", - "v2.1": "2.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jose\\Component\\Core\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-framework/contributors" - } - ], - "description": "Core component of the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-core/tree/v2.2" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": "web-token/jwt-library", - "time": "2020-08-22T13:17:25+00:00" - }, - { - "name": "web-token/jwt-easy", - "version": "v2.2.11", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-easy.git", - "reference": "01db23252bb53d4fd36975b55dd58466bab1bb30" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-easy/zipball/01db23252bb53d4fd36975b55dd58466bab1bb30", - "reference": "01db23252bb53d4fd36975b55dd58466bab1bb30", - "shasum": "" - }, - "require": { - "web-token/jwt-checker": "^2.1", - "web-token/jwt-encryption": "^2.1", - "web-token/jwt-signature": "^2.1" - }, - "suggest": { - "web-token/jwt-encryption-algorithm-aescbc": "Adds AES-CBC based encryption algorithms", - "web-token/jwt-encryption-algorithm-aesgcm": "Adds AES-GCM based encryption algorithms", - "web-token/jwt-encryption-algorithm-aesgcmkw": "Adds AES-GCM Key Wrapping based encryption algorithms", - "web-token/jwt-encryption-algorithm-aeskw": "Adds AES Key Wrapping based encryption algorithms", - "web-token/jwt-encryption-algorithm-dir": "Adds Direct encryption algorithm", - "web-token/jwt-encryption-algorithm-ecdh-es": "Adds ECDH-ES based encryption algorithms", - "web-token/jwt-encryption-algorithm-pbes2": "Adds PBES2 based encryption algorithms", - "web-token/jwt-encryption-algorithm-rsa": "Adds RSA based encryption algorithms", - "web-token/jwt-signature-algorithm-ecdsa": "Adds ECDSA based signature algorithms", - "web-token/jwt-signature-algorithm-eddsa": "Adds EdDSA based signature algorithms", - "web-token/jwt-signature-algorithm-hmac": "Adds HMAC based signature algorithms", - "web-token/jwt-signature-algorithm-none": "Adds none signature algorithms", - "web-token/jwt-signature-algorithm-rsa": "Adds RSA based signature algorithms" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jose\\Easy\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-framework/contributors" - } - ], - "description": "Easy toolset to use the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-easy/tree/v2.2.11" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": true, - "time": "2021-03-17T14:55:52+00:00" - }, - { - "name": "web-token/jwt-encryption", - "version": "v2.2.11", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-encryption.git", - "reference": "3b8d67d7c5c013750703e7c27f1001544407bbb2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-encryption/zipball/3b8d67d7c5c013750703e7c27f1001544407bbb2", - "reference": "3b8d67d7c5c013750703e7c27f1001544407bbb2", - "shasum": "" - }, - "require": { - "web-token/jwt-core": "^2.1" - }, - "suggest": { - "web-token/jwt-encryption-algorithm-aescbc": "AES CBC Based Content Encryption Algorithms", - "web-token/jwt-encryption-algorithm-aesgcm": "AES GCM Based Content Encryption Algorithms", - "web-token/jwt-encryption-algorithm-aesgcmkw": "AES GCM Key Wrapping Based Key Encryption Algorithms", - "web-token/jwt-encryption-algorithm-aeskw": "AES Key Wrapping Based Key Encryption Algorithms", - "web-token/jwt-encryption-algorithm-dir": "Direct Key Encryption Algorithms", - "web-token/jwt-encryption-algorithm-ecdh-es": "ECDH-ES Based Key Encryption Algorithms", - "web-token/jwt-encryption-algorithm-experimental": "Experimental Key and Signature Algorithms", - "web-token/jwt-encryption-algorithm-pbes2": "PBES2 Based Key Encryption Algorithms", - "web-token/jwt-encryption-algorithm-rsa": "RSA Based Key Encryption Algorithms" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jose\\Component\\Encryption\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-encryption/contributors" - } - ], - "description": "Encryption component of the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-encryption/tree/v2.2.11" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": "web-token/jwt-library", - "time": "2021-03-17T14:55:52+00:00" - }, - { - "name": "web-token/jwt-signature", - "version": "v2.2.11", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-signature.git", - "reference": "015b59aaf3b6e8fb9f5bd1338845b7464c7d8103" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-signature/zipball/015b59aaf3b6e8fb9f5bd1338845b7464c7d8103", - "reference": "015b59aaf3b6e8fb9f5bd1338845b7464c7d8103", - "shasum": "" - }, - "require": { - "web-token/jwt-core": "^2.1" - }, - "suggest": { - "web-token/jwt-signature-algorithm-ecdsa": "ECDSA Based Signature Algorithms", - "web-token/jwt-signature-algorithm-eddsa": "EdDSA Based Signature Algorithms", - "web-token/jwt-signature-algorithm-experimental": "Experimental Signature Algorithms", - "web-token/jwt-signature-algorithm-hmac": "HMAC Based Signature Algorithms", - "web-token/jwt-signature-algorithm-none": "None Signature Algorithm", - "web-token/jwt-signature-algorithm-rsa": "RSA Based Signature Algorithms" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jose\\Component\\Signature\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-signature/contributors" - } - ], - "description": "Signature component of the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-signature/tree/v2.2.11" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": "web-token/jwt-library", - "time": "2021-03-01T19:55:28+00:00" - }, - { - "name": "web-token/jwt-signature-algorithm-ecdsa", - "version": "v2.2.11", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-signature-algorithm-ecdsa.git", - "reference": "44cbbb4374c51f1cf48b82ae761efbf24e1a8591" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-signature-algorithm-ecdsa/zipball/44cbbb4374c51f1cf48b82ae761efbf24e1a8591", - "reference": "44cbbb4374c51f1cf48b82ae761efbf24e1a8591", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "web-token/jwt-signature": "^2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jose\\Component\\Signature\\Algorithm\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-framework/contributors" - } - ], - "description": "ECDSA Based Signature Algorithms the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-signature-algorithm-ecdsa/tree/v2.2.11" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": "web-token/jwt-library", - "time": "2021-01-21T19:18:03+00:00" - }, - { - "name": "web-token/jwt-signature-algorithm-hmac", - "version": "v2.2.11", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-signature-algorithm-hmac.git", - "reference": "d208b1c50b408fa711bfeedeed9fb5d9be1d3080" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-signature-algorithm-hmac/zipball/d208b1c50b408fa711bfeedeed9fb5d9be1d3080", - "reference": "d208b1c50b408fa711bfeedeed9fb5d9be1d3080", - "shasum": "" - }, - "require": { - "web-token/jwt-signature": "^2.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jose\\Component\\Signature\\Algorithm\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-framework/contributors" - } - ], - "description": "HMAC Based Signature Algorithms the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-signature-algorithm-hmac/tree/v2.2.11" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": "web-token/jwt-library", - "time": "2021-01-21T19:18:03+00:00" - }, - { - "name": "web-token/jwt-signature-algorithm-rsa", - "version": "v2.1.9", - "source": { - "type": "git", - "url": "https://github.com/web-token/jwt-signature-algorithm-rsa.git", - "reference": "2732e6d12bb84f41c2f000ca822e03b6a1e76531" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/web-token/jwt-signature-algorithm-rsa/zipball/2732e6d12bb84f41c2f000ca822e03b6a1e76531", - "reference": "2732e6d12bb84f41c2f000ca822e03b6a1e76531", - "shasum": "" - }, - "require": { - "lib-openssl": "*", - "web-token/jwt-signature": "^2.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-gmp": "To use PSxxx algorihtms" - }, - "type": "library", - "extra": { - "branch-alias": { - "v1.0": "1.0.x-dev", - "v1.1": "1.1.x-dev", - "v1.2": "1.2.x-dev", - "v1.3": "1.3.x-dev", - "v2.0": "2.0.x-dev", - "v2.1": "2.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Jose\\Component\\Signature\\Algorithm\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Florent Morselli", - "homepage": "https://github.com/Spomky" - }, - { - "name": "All contributors", - "homepage": "https://github.com/web-token/jwt-framework/contributors" - } - ], - "description": "RSA Based Signature Algorithms the JWT Framework.", - "homepage": "https://github.com/web-token", - "keywords": [ - "JOSE", - "JWE", - "JWK", - "JWKSet", - "JWS", - "Jot", - "RFC7515", - "RFC7516", - "RFC7517", - "RFC7518", - "RFC7519", - "RFC7520", - "bundle", - "jwa", - "jwt", - "symfony" - ], - "support": { - "source": "https://github.com/web-token/jwt-signature-algorithm-rsa/tree/v2.1" - }, - "funding": [ - { - "url": "https://www.patreon.com/FlorentMorselli", - "type": "patreon" - } - ], - "abandoned": "web-token/jwt-library", - "time": "2020-05-29T20:21:59+00:00" } ], "packages-dev": [ @@ -8373,16 +7653,16 @@ }, { "name": "laravel/pint", - "version": "v1.28.0", + "version": "v1.29.0", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "1feae84bf9c1649d99ba8f7b8193bf0f09f04cc9" + "reference": "bdec963f53172c5e36330f3a400604c69bf02d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/1feae84bf9c1649d99ba8f7b8193bf0f09f04cc9", - "reference": "1feae84bf9c1649d99ba8f7b8193bf0f09f04cc9", + "url": "https://api.github.com/repos/laravel/pint/zipball/bdec963f53172c5e36330f3a400604c69bf02d39", + "reference": "bdec963f53172c5e36330f3a400604c69bf02d39", "shasum": "" }, "require": { @@ -8399,8 +7679,8 @@ "laravel-zero/framework": "^12.0.5", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^2.4.0", - "pestphp/pest": "^3.8.5", - "shipfastlabs/agent-detector": "^1.0.2" + "pestphp/pest": "^3.8.6", + "shipfastlabs/agent-detector": "^1.1.0" }, "bin": [ "builds/pint" @@ -8437,7 +7717,7 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2026-03-10T20:37:18+00:00" + "time": "2026-03-12T15:51:39+00:00" }, { "name": "laravel/sail", diff --git a/config/esi.php b/config/esi.php new file mode 100644 index 0000000..97676ea --- /dev/null +++ b/config/esi.php @@ -0,0 +1,16 @@ + env('EVEONLINE_CLIENT_ID'), + 'secret' => env('EVEONLINE_CLIENT_SECRET'), + 'useragent' => env('ESI_USERAGENT'), + 'callback' => env('EVEONLINE_REDIRECT_URL'), + 'primary' => env('ESI_PRIMARY_CHAR'), + 'corporation' => env('ESI_CORPORATION'), + 'public_mining_tax' => env('PUBLIC_MINING_TAX', 0.15), + 'mining_tax' => env('MINING_TAX', 0.15), + 'refine_rate' => env('REFINE_RATE', 0.7948248), + 'eveMailEnabled' => env('EVE_MAIL_ENABLED', false), + ]; + +?> \ No newline at end of file diff --git a/config/esiscopes.php b/config/esiscopes.php new file mode 100644 index 0000000..071d447 --- /dev/null +++ b/config/esiscopes.php @@ -0,0 +1,153 @@ + [ + "esi-alliances.read_contacts.v1", + "esi-assets.read_assets.v1", + "esi-assets.read_corporation_assets.v1", + "esi-calendar.read_calendar_events.v1", + "esi-calendar.respond_calendar_events.v1", + "esi-characters.read_agents_research.v1", + "esi-characters.read_blueprints.v1", + "esi-characters.read_contacts.v1", + "esi-characters.read_corporation_roles.v1", + "esi-characters.read_fatigue.v1", + "esi-characters.read_fw_stats.v1", + "esi-characters.read_loyalty.v1", + "esi-characters.read_medals.v1", + "esi-characters.read_notifications.v1", + "esi-characters.read_standings.v1", + "esi-characters.read_titles.v1", + "esi-characters.write_contacts.v1", + "esi-clones.read_clones.v1", + "esi-clones.read_implants.v1", + "esi-contracts.read_character_contracts.v1", + "esi-contracts.read_corporation_contracts.v1", + "esi-corporations.read_blueprints.v1", + "esi-corporations.read_contacts.v1", + "esi-corporations.read_container_logs.v1", + "esi-corporations.read_corporation_membership.v1", + "esi-corporations.read_divisions.v1", + "esi-corporations.read_facilities.v1", + "esi-corporations.read_fw_stats.v1", + "esi-corporations.read_medals.v1", + "esi-corporations.read_standings.v1", + "esi-corporations.read_starbases.v1", + "esi-corporations.read_structures.v1", + "esi-corporations.read_titles.v1", + "esi-corporations.track_members.v1", + "esi-fittings.read_fittings.v1", + "esi-fittings.write_fittings.v1", + "esi-fleets.read_fleet.v1", + "esi-fleets.write_fleet.v1", + "esi-industry.read_character_jobs.v1", + "esi-industry.read_character_mining.v1", + "esi-industry.read_corporation_jobs.v1", + "esi-industry.read_corporation_mining.v1", + "esi-killmails.read_corporation_killmails.v1", + "esi-killmails.read_killmails.v1", + "esi-location.read_location.v1", + "esi-location.read_online.v1", + "esi-location.read_ship_type.v1", + "esi-mail.organize_mail.v1", + "esi-mail.read_mail.v1", + "esi-mail.send_mail.v1", + "esi-markets.read_character_orders.v1", + "esi-markets.read_corporation_orders.v1", + "esi-markets.structure_markets.v1", + "esi-planets.manage_planets.v1", + "esi-planets.read_customs_offices.v1", + "esi-search.search_structures.v1", + "esi-skills.read_skillqueue.v1", + "esi-skills.read_skills.v1", + "esi-ui.open_window.v1", + "esi-ui.write_waypoint.v1", + "esi-universe.read_structures.v1", + "esi-wallet.read_character_wallet.v1", + "esi-wallet.read_corporation_wallets.v1", + ], + + 'implants' => [ + "esi-clones.read_implants.v1", + "esi-location.read_location.v1", + "esi-location.read_online.v1", + "esi-location.read_ship_type.v1", + "esi-mail.send_mail.v1", + ], + + 'character' => [ + "esi-characters.read_agents_research.v1", + "esi-characters.read_blueprints.v1", + "esi-characters.read_contacts.v1", + "esi-characters.read_corporation_roles.v1", + "esi-characters.read_fatigue.v1", + "esi-characters.read_fw_stats.v1", + "esi-characters.read_loyalty.v1", + "esi-characters.read_medals.v1", + "esi-characters.read_notifications.v1", + "esi-characters.read_standings.v1", + "esi-characters.read_titles.v1", + "esi-characters.write_contacts.v1", + "esi-wallet.read_character_wallet.v1", + "esi-clones.read_clones.v1", + "esi-clones.read_implants.v1", + "esi-fittings.read_fittings.v1", + "esi-fittings.write_fittings.v1", + "esi-markets.read_character_orders.v1", + "esi-contracts.read_character_contracts.v1", + "esi-industry.read_character_jobs.v1", + "esi-industry.read_character_mining.v1", + "esi-skills.read_skillqueue.v1", + "esi-skills.read_skills.v1", + "esi-assets.read_assets.v1", + ], + + 'corporation' => [ + "esi-corporations.read_blueprints.v1", + "esi-corporations.read_contacts.v1", + "esi-corporations.read_container_logs.v1", + "esi-corporations.read_corporation_membership.v1", + "esi-corporations.read_divisions.v1", + "esi-corporations.read_facilities.v1", + "esi-corporations.read_fw_stats.v1", + "esi-corporations.read_medals.v1", + "esi-corporations.read_standings.v1", + "esi-corporations.read_starbases.v1", + "esi-corporations.read_structures.v1", + "esi-corporations.read_titles.v1", + "esi-corporations.track_members.v1", + "esi-wallet.read_corporation_wallets.v1", + "esi-markets.read_corporation_orders.v1", + "esi-contracts.read_corporation_contracts.v1", + "esi-industry.read_corporation_jobs.v1", + "esi-industry.read_corporation_mining.v1", + "esi-assets.read_corporation_assets.v1", + ], + + 'alliance' => [ + "esi-alliances.read_contacts.v1", + ], + + 'mail' => [ + "esi-mail.organize_mail.v1", + "esi-mail.read_mail.v1", + "esi-mail.send_mail.v1", + "esi-characters.read_contacts.v1", + ], + + 'markets' => [ + "esi-markets.read_character_orders.v1", + "esi-markets.read_corporation_orders.v1", + "esi-markets.structure_markets.v1", + ], + + 'killmails' => [ + "esi-killmails.read_corporation_killmails.v1", + "esi-killmails.read_killmails.v1", + ], + + 'fleets' => [ + "esi-fleets.read_fleet.v1", + "esi-fleets.write_fleet.v1", + ], + ] +?> \ No newline at end of file diff --git a/config/horizon.php b/config/horizon.php new file mode 100644 index 0000000..0280eae --- /dev/null +++ b/config/horizon.php @@ -0,0 +1,274 @@ + env('HORIZON_NAME'), + + /* + |-------------------------------------------------------------------------- + | Horizon Domain + |-------------------------------------------------------------------------- + | + | This is the subdomain where Horizon will be accessible from. If this + | setting is null, Horizon will reside under the same domain as the + | application. Otherwise, this value will serve as the subdomain. + | + */ + + 'domain' => env('HORIZON_DOMAIN'), + + /* + |-------------------------------------------------------------------------- + | Horizon Path + |-------------------------------------------------------------------------- + | + | This is the URI path where Horizon will be accessible from. Feel free + | to change this path to anything you like. Note that the URI will not + | affect the paths of its internal API that aren't exposed to users. + | + */ + + 'path' => env('HORIZON_PATH', 'horizon'), + + /* + |-------------------------------------------------------------------------- + | Horizon Redis Connection + |-------------------------------------------------------------------------- + | + | This is the name of the Redis connection where Horizon will store the + | meta information required for it to function. It includes the list + | of supervisors, failed jobs, job metrics, and other information. + | + */ + + 'use' => 'default', + + /* + |-------------------------------------------------------------------------- + | Horizon Redis Prefix + |-------------------------------------------------------------------------- + | + | This prefix will be used when storing all Horizon data in Redis. You + | may modify the prefix when you are running multiple installations + | of Horizon on the same server so that they don't have problems. + | + */ + + 'prefix' => env( + 'HORIZON_PREFIX', + Str::slug(env('APP_NAME', 'laravel'), '_').'_horizon:' + ), + + /* + |-------------------------------------------------------------------------- + | Horizon Route Middleware + |-------------------------------------------------------------------------- + | + | These middleware will get attached onto each Horizon route, giving you + | the chance to add your own middleware to this list or change any of + | the existing middleware. Or, you can simply stick with this list. + | + */ + + 'middleware' => ['web'], + + /* + |-------------------------------------------------------------------------- + | Queue Wait Time Thresholds + |-------------------------------------------------------------------------- + | + | This option allows you to configure when the LongWaitDetected event + | will be fired. Every connection / queue combination may have its + | own, unique threshold (in seconds) before this event is fired. + | + */ + + 'waits' => [ + 'redis:default' => 60, + ], + + /* + |-------------------------------------------------------------------------- + | Job Trimming Times + |-------------------------------------------------------------------------- + | + | Here you can configure for how long (in minutes) you desire Horizon to + | persist the recent and failed jobs. Typically, recent jobs are kept + | for one hour while all failed jobs are stored for an entire week. + | + */ + + 'trim' => [ + 'recent' => 60, + 'pending' => 60, + 'completed' => 60, + 'recent_failed' => 10080, + 'failed' => 10080, + 'monitored' => 10080, + ], + + /* + |-------------------------------------------------------------------------- + | Silenced Jobs + |-------------------------------------------------------------------------- + | + | Silencing a job will instruct Horizon to not place the job in the list + | of completed jobs within the Horizon dashboard. This setting may be + | used to fully remove any noisy jobs from the completed jobs list. + | + */ + + 'silenced' => [ + // App\Jobs\ExampleJob::class, + ], + + 'silenced_tags' => [ + // 'notifications', + ], + + /* + |-------------------------------------------------------------------------- + | Metrics + |-------------------------------------------------------------------------- + | + | Here you can configure how many snapshots should be kept to display in + | the metrics graph. This will get used in combination with Horizon's + | `horizon:snapshot` schedule to define how long to retain metrics. + | + */ + + 'metrics' => [ + 'trim_snapshots' => [ + 'job' => 24, + 'queue' => 24, + ], + ], + + /* + |-------------------------------------------------------------------------- + | Fast Termination + |-------------------------------------------------------------------------- + | + | When this option is enabled, Horizon's "terminate" command will not + | wait on all of the workers to terminate unless the --wait option + | is provided. Fast termination can shorten deployment delay by + | allowing a new instance of Horizon to start while the last + | instance will continue to terminate each of its workers. + | + */ + + 'fast_termination' => false, + + /* + |-------------------------------------------------------------------------- + | Memory Limit (MB) + |-------------------------------------------------------------------------- + | + | This value describes the maximum amount of memory the Horizon master + | supervisor may consume before it is terminated and restarted. For + | configuring these limits on your workers, see the next section. + | + */ + + 'memory_limit' => 64, + + /* + |-------------------------------------------------------------------------- + | Queue Worker Configuration + |-------------------------------------------------------------------------- + | + | Here you may define the queue worker settings used by your application + | in all environments. These supervisors and settings handle all your + | queued jobs and will be provisioned by Horizon during deployment. + | + */ + + 'defaults' => [ + 'supervisor-1' => [ + 'connection' => 'redis', + 'queue' => [ + 'default', + 'journal', + 'mail', + 'taxes', + 'structures', + 'finances', + 'assets', + 'characters', + 'corporations', + 'alliance', + ], + 'balance' => 'auto', + 'autoScalingStrategy' => 'time', + 'maxProcesses' => 20, + 'maxTime' => 0, + 'maxJobs' => 0, + 'memory' => 128, + 'tries' => 3, + 'timeout' => 60, + 'nice' => 0, + ], + ], + + 'environments' => [ + 'production' => [ + 'supervisor-1' => [ + 'maxProcesses' => 20, + 'balanceMaxShift' => 1, + 'balanceCooldown' => 3, + 'maxTime' => 3600, + 'maxJobs' => 1000, + 'tries' => 3, + ], + ], + + 'local' => [ + 'supervisor-1' => [ + 'minProcesses' => 1, + 'maxProcesses' => 20, + 'balanceMaxShift' => 2, + 'balanceCooldown' => 5, + 'maxTime' => 3600, + 'maxJobs' => 1000, + 'tries' => 3, + ], + ], + ], + + /* + |-------------------------------------------------------------------------- + | File Watcher Configuration + |-------------------------------------------------------------------------- + | + | The following list of directories and files will be watched when using + | the `horizon:listen` command. Whenever any directories or files are + | changed, Horizon will automatically restart to apply all changes. + | + */ + + 'watch' => [ + 'app', + 'bootstrap', + 'config/**/*.php', + 'database/**/*.php', + 'public/**/*.php', + 'resources/**/*.php', + 'routes', + 'composer.lock', + 'composer.json', + '.env', + ], +]; diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index ff0d123..1be44ba 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -57,6 +57,91 @@ return new class extends Migration $table->string('scope'); }); } + + if(!Schema::hasTable('user_alts')) { + Schema::create('user_alts', function(Blueprint $table) { + $table->id(); + $table->string('name'); + $table->unsignedBigInteger('main_id'); + $table->unsignedBigInteger('character_id')->unique(); + $table->string('avatar'); + $table->string('access_token')->nullable(); + $table->string('refresh_token')->nullable(); + $table->integer('inserted_at')->default(0); + $table->integer('expires_in')->default(0); + $table->string('owner_hash'); + $table->rememberToken(); + $table->timestamps(); + + $table->foreign('main_id', 'fk_users_alts_main_id') + ->references('character_id') + ->on('users') + ->cascadeOnDelete(); + }); + } + + if(!Schema::hasTable('character_to_corporation')) { + Schema::create('character_to_corporation', function(Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('character_id'); + $table->string('character_name'); + $table->unsignedBigInteger('corporation_id'); + $table->string('corporation_name'); + }); + } + + if(!Schema::hasTable('corporation_to_alliance')) { + Schema::create('corporation_to_alliance', function(Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('corporation_id'); + $table->string('corporation_name'); + $table->unsignedBigInteger('alliance_id'); + $table->string('alliance_name'); + }); + } + + if(!Schema::hasTable('allowed_logins')) { + Schema::create('allowed_logins', function(Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('entity_id'); + $table->enum('entity_type', [ + 'character', + 'corporation', + 'alliance', + ]); + $table->string('entity_name'); + $table->string('login_type'); + $table->timestamps(); + }); + } + + if(!Schema::hasTable('wiki_users')) { + Schema::create('wiki_users', function(Blueprint $table) { + $table->id(); + $table->string('login'); + $table->string('pass'); + $table->string('name'); + $table->string('mail')->default('')->nullable(); + $table->unique('login', 'user'); + }); + } + + if(!Schema::hasTable('wiki_member')) { + Schema::create('wiki_member', function(Blueprint $table) { + $table->integer('uid'); + $table->integer('gid'); + $table->string('groupname'); + $table->primary(['uid', 'gid']); + }); + } + + if(!Schema::hasTable('wiki_groupnames')) { + Schema::create('wiki_groupnames', function (Blueprint $table) { + $table->id(); + $table->string('gname'); + $table->unique('id', 'id'); + }); + } } /** @@ -69,5 +154,12 @@ return new class extends Migration Schema::dropIfExists('sessions'); Schema::dropIfExists('esi_token'); Schema::dropIfExists('esi_scopes'); + Schema::dropIfExists('user_alts'); + Schema::dropIfExists('character_to_corporation'); + Schema::dropIfExists('corporation_to_alliance'); + Schema::dropIfExists('allowed_logins'); + Schema::dropIfExists('wiki_users'); + Schema::dropIfExists('wiki_member'); + Schema::dropIfExists('wiki_groupnames'); } }; diff --git a/database/migrations/2026_03_10_013849_create_eve_tables.php b/database/migrations/2026_03_10_013849_create_eve_tables.php index 83df432..8270187 100644 --- a/database/migrations/2026_03_10_013849_create_eve_tables.php +++ b/database/migrations/2026_03_10_013849_create_eve_tables.php @@ -281,916 +281,6 @@ return new class extends Migration $table->unsignedBigInteger('max_stable_time'); }); } - - DB::table('wormhole_types')->insert([ - 'type' => 'A009', - 'type' => 'C13', - 'leads_to' => 'W-Space', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'A239', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'A641', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 2000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'A982', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'B041', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 5000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 48, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'B274', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'B449', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 2000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'B520', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 5000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'B735', - 'type' => 'Drifter', - 'leads_to' => 'Barbican', - 'mass_allowed' => 750000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'C008', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 500000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'C125', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'C140', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'C247', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'C248', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 5000000000, - 'individual_mass' => 1800000000, - 'regeneration' => 500000000, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'C391', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 5000000000, - 'individual_mass' => 1800000000, - 'regeneration' => 500000000, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'C414', - 'type' => 'Drifter', - 'leads_to' => 'Conflux', - 'mass_allowed' => 750000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'D364', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'D382', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'D792', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'D845', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'E004', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 500000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'E175', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 500000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'E545', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'E587', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'F135', - 'type' => 'Thera', - 'leads_to' => 'Thera', - 'mass_allowed' => 750000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'F353', - 'type' => 'Thera', - 'leads_to' => 'Thera', - 'mass_allowed' => 100000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'F355', - 'type' => 'Thera', - 'leads_to' => 'Thera', - 'mass_allowed' => 100000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'G008', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 500000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'G024', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'H121', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'H296', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'H900', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'I182', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'J244', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'K162', - 'type' => 'Exit WH', - 'leads_to' => 'Exit', - 'mass_allowed' => 0, - 'individual_mass' => 0, - 'regeneration' => 0, - 'max_stable_time' => 0, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'K329', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 5000000000, - 'individual_mass' => 1800000000, - 'regeneration' => 500000000, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'K346', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'L005', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 500000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'L031', - 'type' => 'Thera', - 'leads_to' => 'Thera', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'L477', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'L614', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'M001', - 'type' => 'C4', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 500000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'M164', - 'type' => 'Thera', - 'leads_to' => 'Thera', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'M267', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'M555', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'M609', - 'type' => 'C4', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N062', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N110', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N290', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 5000000000, - 'individual_mass' => 1800000000, - 'regeneration' => 500000000, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N432', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N766', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N770', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N944', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'N968', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'O128', - 'type' => 'C4', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 300000000, - 'regeneration' => 100000000, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'O477', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'O883', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'P060', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Q003', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 500000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Q063', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Q317', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'R051', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'R259', - 'type' => 'Drifter', - 'leads_to' => 'Redoubt', - 'mass_allowed' => 750000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'R474', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'R943', - 'type' => 'C2', - 'leads_to' => 'W-Space', - 'mass_allowed' => 750000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'S047', - 'type' => 'C7', - 'leads_to' => 'Highsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'S199', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'S804', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'S877', - 'type' => 'Drifter', - 'leads_to' => 'Sentinel', - 'mass_allowed' => 750000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'T405', - 'type' => 'C4', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'T458', - 'type' => 'Thera', - 'leads_to' => 'Thera', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'U210', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'U319', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1800000000, - 'regeneration' => 500000000, - 'max_stable_time' => 48, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'U574', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'V283', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1000000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'V301', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'V753', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'V898', - 'type' => 'C8', - 'leads_to' => 'Lowsec', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'V911', - 'type' => 'C5', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'V928', - 'type' => 'Drifter', - 'leads_to' => 'Vidette', - 'mass_allowed' => 750000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'W237', - 'type' => 'C6', - 'leads_to' => 'W-Space', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'X702', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'X877', - 'type' => 'C4', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Y683', - 'type' => 'C4', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Y790', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Z006', - 'type' => 'C3', - 'leads_to' => 'W-Space', - 'mass_allowed' => 1000000000, - 'individual_mass' => 5000000, - 'regeneration' => 5000000, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Z060', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 1000000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Z142', - 'type' => 'C9', - 'leads_to' => 'Nullsec', - 'mass_allowed' => 3000000000, - 'individual_mass' => 1350000000, - 'regeneration' => 0, - 'max_stable_time' => 24, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Z457', - 'type' => 'C4', - 'leads_to' => 'W-Space', - 'mass_allowed' => 2000000000, - 'individual_mass' => 300000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Z647', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 500000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); - - DB::table('wormhole_types')->insert([ - 'type' => 'Z971', - 'type' => 'C1', - 'leads_to' => 'W-Space', - 'mass_allowed' => 100000000, - 'individual_mass' => 20000000, - 'regeneration' => 0, - 'max_stable_time' => 16, - ]); } if(!Schema::hasTable('corporation_wallet_journal')) { @@ -1348,6 +438,220 @@ return new class extends Migration $table->timestamps(); }); } + + if(!Schema::hasTable('character_assets')) { + Schema::create('character_assets', function (Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('character_id'); + $table->boolean('is_blueprint_copy'); + $table->boolean('is_singleton'); + $table->unsignedBigInteger('item_id'); + $table->enum('location_flag', [ + 'AssetSafety', + 'AutoFit', + 'BoosterBay', + 'CapsuleerDeliveries', + 'Cargo', + 'CorporationGoalDeliveries', + 'CorpseBay', + 'Deliveries', + 'Dronebay', + 'ExpeditionHold', + 'FighterBay', + 'FighterTube0', + 'FighterTube1', + 'FighterTube2', + 'FighterTube3', + 'FighterTube4', + 'FleetHangar', + 'FrigateEscapeBay', + 'Hangar', + 'HangarAll', + 'HiSlot0', + 'HiSlot1', + 'HiSlot2', + 'HiSlot3', + 'HiSlot4', + 'HiSlot5', + 'HiSlot6', + 'HiSlot7', + 'HiSlot8', + 'HiddenModifiers', + 'Implant', + 'InfrastructureHangar', + 'LoSlot0', + 'LoSlot1', + 'LoSlot2', + 'LoSlot3', + 'LoSlot4', + 'LoSlot5', + 'LoSlot6', + 'LoSlot7', + 'Locked', + 'MedSlot0', + 'MedSlot1', + 'MedSlot2', + 'MedSlot3', + 'MedSlot4', + 'MedSlot5', + 'MedSlot6', + 'MedSlot7', + 'MobileDepotHold', + 'MoonMaterialBay', + 'QuafeBay', + 'RigSlot0', + 'RigSlot1', + 'RigSlot2', + 'RigSlot3', + 'RigSlot4', + 'RigSlot5', + 'RigSlot6', + 'RigSlot7', + 'SpecializedCommandCenterHold', + 'SpecializedFuelBay', + 'SpecializedGasHold', + 'SpecializedIceHold', + 'SpecializedIndustrialShipHold', + 'SpecializedLargeShipHold', + 'SpecializedMaterialBay', + 'SpecializedMediumShipHold', + 'SpecializedMineralHold', + 'SpecializedOreHold', + 'SpecializedPlanetaryCommoditiesHold', + 'SpecializedSalvageHold', + 'SpecializedShipHold', + 'StructureDeedBay', + 'SubSystemBay', + 'SubSystemSlot0', + 'SubSystemSlot1', + 'SubSystemSlot2', + 'SubSystemSlot3', + 'SubSystemSlot4', + 'SubSystemSlot5', + 'SubSystemSlot6', + 'SubSystemSlot7', + 'Unlocked', + 'Wardrobe', + ]); + $table->unsignedBigInteger('location_id'); + $table->enum('location_type', [ + 'station', + 'solar_system', + 'item', + 'other', + ]); + $table->unsignedBigInteger('quantity'); + $table->unsignedBigInteger('type_id'); + $table->timestamps(); + }); + } + + if(!Schema::hasTable('corporation_assets')) { + Schema::create('corporation_assets', function (Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('corporation_id'); + $table->boolean('is_blueprint_copy'); + $table->boolean('is_singleton'); + $table->unsignedBigInteger('item_id'); + $table->enum('location_flag', [ + 'AssetSafety', + 'AutoFit', + 'BoosterBay', + 'CapsuleerDeliveries', + 'Cargo', + 'CorporationGoalDeliveries', + 'CorpseBay', + 'Deliveries', + 'Dronebay', + 'ExpeditionHold', + 'FighterBay', + 'FighterTube0', + 'FighterTube1', + 'FighterTube2', + 'FighterTube3', + 'FighterTube4', + 'FleetHangar', + 'FrigateEscapeBay', + 'Hangar', + 'HangarAll', + 'HiSlot0', + 'HiSlot1', + 'HiSlot2', + 'HiSlot3', + 'HiSlot4', + 'HiSlot5', + 'HiSlot6', + 'HiSlot7', + 'HiSlot8', + 'HiddenModifiers', + 'Implant', + 'InfrastructureHangar', + 'LoSlot0', + 'LoSlot1', + 'LoSlot2', + 'LoSlot3', + 'LoSlot4', + 'LoSlot5', + 'LoSlot6', + 'LoSlot7', + 'Locked', + 'MedSlot0', + 'MedSlot1', + 'MedSlot2', + 'MedSlot3', + 'MedSlot4', + 'MedSlot5', + 'MedSlot6', + 'MedSlot7', + 'MobileDepotHold', + 'MoonMaterialBay', + 'QuafeBay', + 'RigSlot0', + 'RigSlot1', + 'RigSlot2', + 'RigSlot3', + 'RigSlot4', + 'RigSlot5', + 'RigSlot6', + 'RigSlot7', + 'SpecializedCommandCenterHold', + 'SpecializedFuelBay', + 'SpecializedGasHold', + 'SpecializedIceHold', + 'SpecializedIndustrialShipHold', + 'SpecializedLargeShipHold', + 'SpecializedMaterialBay', + 'SpecializedMediumShipHold', + 'SpecializedMineralHold', + 'SpecializedOreHold', + 'SpecializedPlanetaryCommoditiesHold', + 'SpecializedSalvageHold', + 'SpecializedShipHold', + 'StructureDeedBay', + 'SubSystemBay', + 'SubSystemSlot0', + 'SubSystemSlot1', + 'SubSystemSlot2', + 'SubSystemSlot3', + 'SubSystemSlot4', + 'SubSystemSlot5', + 'SubSystemSlot6', + 'SubSystemSlot7', + 'Unlocked', + 'Wardrobe', + ]); + $table->unsignedBigInteger('location_id'); + $table->enum('location_type', [ + 'station', + 'solar_system', + 'item', + 'other', + ]); + $table->unsignedBigInteger('quantity'); + $table->unsignedBigInteger('type_id'); + $table->timestamps(); + }); + } } /** diff --git a/database/migrations/2026_03_10_025605_create_srp_tables.php b/database/migrations/2026_03_10_025605_create_srp_tables.php index fb61357..80c9bb1 100644 --- a/database/migrations/2026_03_10_025605_create_srp_tables.php +++ b/database/migrations/2026_03_10_025605_create_srp_tables.php @@ -57,101 +57,6 @@ return new class extends Migration $table->decimal('payout', 5, 2); }); } - - DB::table('srp_ship_types')->insert([ - 'code' => 'None', - 'description' => 'None', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'T1FDC', - 'description' => 'T1 Frig / Dessie / Cruiser', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'T1BC', - 'description' => 'T1 Battelcruiser', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'T2F', - 'description' => 'T2 Frigate', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'T3D', - 'description' => 'T3 Destroyer', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'T1T2Logi', - 'description' => 'T1 & T2 Logistics', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'RI', - 'description' => 'Recons / Interdictors', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'T2C', - 'description' => 'T2 Cruiser', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'T3C', - 'description' => 'T3 Cruiser', - ]); - - DB::table('srp_ship_types')->insert([ - 'code' => 'COM', - 'description' => 'Command Ship', - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'T1FDC', - 'payout' => 75.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'T1BC', - 'payout' => 60.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'T2F', - 'payout' => 60.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'T3D', - 'payout' => 60.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'T1T2Logi', - 'payout' => 100.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'RI', - 'payout' => 50.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'T2C', - 'payout' => 50.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'T3C', - 'payout' => 50.00, - ]); - - DB::table('srp_payouts')->insert([ - 'code' => 'COM', - 'payout' => 100.00, - ]); } /** diff --git a/database/migrations/2026_03_10_025618_create_black_list.php b/database/migrations/2026_03_10_025618_create_black_list.php index 34a5551..763b6c5 100644 --- a/database/migrations/2026_03_10_025618_create_black_list.php +++ b/database/migrations/2026_03_10_025618_create_black_list.php @@ -36,8 +36,6 @@ return new class extends Migration $table->timestamps(); }); } - - } /** diff --git a/database/migrations/2026_03_10_025658_create_mining_tax.php b/database/migrations/2026_03_10_025658_create_mining_tax.php index 6fea730..f689d01 100644 --- a/database/migrations/2026_03_10_025658_create_mining_tax.php +++ b/database/migrations/2026_03_10_025658_create_mining_tax.php @@ -14,8 +14,10 @@ return new class extends Migration if(!Schema::hasTable('moon_mining_tax')) { Schema::create('moon_mining_tax', function (Blueprint $table) { $table->id(); - $table->string('moon_id'); + $table->unsignedBigInteger('moon_id'); $table->string('name'); + $table->unsignedBigInteger('character_id'); + $table->string('character_name'); $table->decimal('worth', 20, 2); $table->decimal('tax_bracket', 5, 2); $table->decimal('tax_amount', 20, 2); @@ -23,8 +25,24 @@ return new class extends Migration $table->timestamps(); }); } - + if(!Schema::hasTable('ore_mining_tax')) { + Schema::create('ore_mining_tax', function (Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('character_id'); + $table->string('character_name'); + $table->unsignedBigInteger('corporation_id'); + $table->string('corporation_name'); + $table->unsignedBigInteger('ore_id'); + $table->string('ore'); + $table->unsignedBigInteger('ore_amount'); + $table->decimal('ore_worth', 20, 2); + $table->decimal('tax_amount', 20, 2); + $table->dateTime('tax_date'); + $table->timestamps(); + }); + } + if(!Schema::hasTable('mining_tax')) { Schema::create('mining_tax', function (Blueprint $table) { $table->id(); @@ -42,5 +60,7 @@ return new class extends Migration public function down(): void { Schema::dropIfExists('moon_mining_tax'); + Schema::dropIfExists('ore_mining_tax'); + Schema::dropIfExists('mining_tax'); } }; diff --git a/database/migrations/2026_03_14_215315_create_ore_item_composition.php b/database/migrations/2026_03_14_215315_create_ore_item_composition.php new file mode 100644 index 0000000..567694f --- /dev/null +++ b/database/migrations/2026_03_14_215315_create_ore_item_composition.php @@ -0,0 +1,91 @@ +id(); + $table->string('Name')->nullable(); + $table->unsignedBigInteger('ItemId')->unique(); + $table->decimal('m3Size', 20, 2)->default(0.00); + $table->integer('BatchSize')->default(100); + $table->unsignedInteger('Tritanium')->default(0); + $table->unsignedInteger('Pyerite')->default(0); + $table->unsignedInteger('Mexallon')->default(0); + $table->unsignedInteger('Isogen')->default(0); + $table->unsignedInteger('Nocxium')->default(0); + $table->unsignedInteger('Zydrine')->default(0); + $table->unsignedInteger('Megacyte')->default(0); + $table->unsignedInteger('Morphite')->default(0); + $table->unsignedInteger('Heavy_Water')->default(0); + $table->unsignedInteger('Liquid_Ozone')->default(0); + $table->unsignedInteger('Nitrogen_Isotopes')->default(0); + $table->unsignedInteger('Helium_Isotopes')->default(0); + $table->unsignedInteger('Hydrogen_Isotopes')->default(0); + $table->unsignedInteger('Oxygen_Isotopes')->default(0); + $table->unsignedInteger('Strontium_Clathrates')->default(0); + $table->unsignedInteger('Atmosperhic_Gases')->default(0); + $table->unsignedInteger('Evaporite_Deposits')->default(0); + $table->unsignedInteger('Hydrocarbons')->default(0); + $table->unsignedInteger('Silicates')->default(0); + $table->unsignedInteger('Cobalt')->default(0); + $table->unsignedInteger('Scandium')->default(0); + $table->unsignedInteger('Titanium')->default(0); + $table->unsignedInteger('Tungsten')->default(0); + $table->unsignedInteger('Cadmium')->default(0); + $table->unsignedInteger('Platinum')->default(0); + $table->unsignedInteger('Vanadium')->default(0); + $table->unsignedInteger('Chromium')->default(0); + $table->unsignedInteger('Technetium')->default(0); + $table->unsignedInteger('Hafnium')->default(0); + $table->unsignedInteger('Caesium')->default(0); + $table->unsignedInteger('Mercury')->default(0); + $table->unsignedInteger('Dysprosium')->default(0); + $table->unsignedInteger('Neodymium')->default(0); + $table->unsignedInteger('Promethium')->default(0); + $table->unsignedInteger('Thulium')->default(0); + }); + } + + if(!Schema::hasTable('mineral_prices')) { + Schema::create('mineral_prices', function(Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('ItemId'); + $table->string('Name'); + $table->decimal('Price', 20, 2); + $table->dateTime('Time'); + }); + } + + if(!Schema::hasTable('ore_prices')) { + Schema::create('ore_prices', function(Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('ItemId'); + $table->string('Name'); + $table->decimal('BatchPrice', 20, 2); + $table->decimal('UnitPrice', 20, 2); + $table->decimal('m3Price', 20, 2); + $table->dateTime('Time'); + }); + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('ore_composition'); + Schema::dropIfExists('mineral_prices'); + Schema::dropIfExists('ore_prices'); + } +}; diff --git a/database/migrations/2026_03_14_225813_create_adm_bonuses_table.php b/database/migrations/2026_03_14_225813_create_adm_bonuses_table.php new file mode 100644 index 0000000..5aeca44 --- /dev/null +++ b/database/migrations/2026_03_14_225813_create_adm_bonuses_table.php @@ -0,0 +1,50 @@ +id(); + $table->unsignedBigInteger('character_id'); + $table->string('character_name'); + $table->unsignedBigInteger('system_id'); + $table->string('system_name'); + $table->decimal('system_index', 3, 1); + $table->decimal('system_adm', 5, 2); + $table->decimal('bonus_percentage'); + $table->decimal('bonus_amount'); + $table->timestamps(); + }); + } + + if(!Schema::hasTable('adm_bonus_account')) { + Schema::create('adm_bonus_account', function(Blueprint $table) { + $table->id(); + $table->unsignedBigInteger('character_id'); + $table->string('character_name'); + $table->unsignedBigInteger('account_number'); + $table->decimal('total_amount', 20, 2); + $table->decimal('total_paid', 20, 2); + $table->decimal('balance', 20, 2); + $table->timestamps(); + }); + } + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::dropIfExists('adm_bonuses'); + } +}; diff --git a/database/seeders/AvailableUserPermissionsSeeder.php b/database/seeders/AvailableUserPermissionsSeeder.php new file mode 100644 index 0000000..4852233 --- /dev/null +++ b/database/seeders/AvailableUserPermissionsSeeder.php @@ -0,0 +1,65 @@ +insert([ + 'permission' => 'structure.operator', + 'description' => 'Structure Operator to include receiveing alerts.', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'logistics.minion', + 'description' => 'Logistics Minion who helps with shipments.', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'logistics.admin', + 'description' => 'Logistics Administrator.', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'fc.lead', + 'description' => 'Fleet Controller Lead', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'finance.lead', + 'description' => 'Corporation Director or Finance Officer', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'mining.officer', + 'description' => 'Person in charge of mining operations', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'mining.user', + 'description' => 'Mining Operation minion', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'srp.admin', + 'description' => 'Admin of Ship Replacement Program', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'srp.lead', + 'description' => 'Second in Command of Ship Replacement Program', + ]); + + DB::table('available_user_permissions')->insert([ + 'permission' => 'srp.user', + 'description' => 'User of Ship Replacement Program', + ]); + } +} diff --git a/database/seeders/AvailableUserRoleSeeder.php b/database/seeders/AvailableUserRoleSeeder.php new file mode 100644 index 0000000..9cb49e7 --- /dev/null +++ b/database/seeders/AvailableUserRoleSeeder.php @@ -0,0 +1,50 @@ +insert([ + 'role' => 'Guest', + 'description' => 'Guest of the site', + ]); + + DB::table('available_user_roles')->insert([ + 'role' => 'User', + 'description' => 'User of the site', + ]); + + DB::table('available_user_roles')->insert([ + 'role' => 'Contractor', + 'description' => 'Contractor of Services', + ]); + + DB::table('available_user_roles')->insert([ + 'role' => 'Member', + 'description' => 'Member of the corporation / alliance', + ]); + + DB::table('available_user_roles')->insert([ + 'role' => 'Officer', + 'description' => 'Office of the corporation / alliance', + ]); + + DB::table('available_user_roles')->insert([ + 'role' => 'Admin', + 'description' => 'Administrator of the site.', + ]); + + DB::table('available_user_roles')->insert([ + 'role' => 'SuperUser', + 'description' => 'Super User of the site.', + ]); + } +} diff --git a/database/seeders/ConfigTableSeeder.php b/database/seeders/ConfigTableSeeder.php new file mode 100644 index 0000000..02d70c8 --- /dev/null +++ b/database/seeders/ConfigTableSeeder.php @@ -0,0 +1,21 @@ +insert([ + 'RentalTax' => 20.00, + 'RefineRate' => 84.00, + 'RentalTime' => 7776000, + ]); + } +} diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index df961c7..4d84e47 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -15,11 +15,13 @@ class DatabaseSeeder extends Seeder */ public function run(): void { - // User::factory(10)->create(); - - User::factory()->create([ - 'name' => 'Test User', - 'email' => 'test@example.com', - ]); + //Seeders + $this->call(AvailableUserPermissionsSeeder::class()); + $this->call(AvailableUserRolesSeeder::class()); + $this->call(ConfigTableSeeder::class()); + $this->call(SolarSystemSeeder::class()); + $this->call(SRPTableSeeder::class()); + $this->call(WikiTableSeeder::class()); + $this->call(WormholeTypeSeeder::class()); } } diff --git a/database/seeders/MoonUpdateSeeder.php b/database/seeders/MoonUpdateSeeder.php new file mode 100644 index 0000000..0cb07c9 --- /dev/null +++ b/database/seeders/MoonUpdateSeeder.php @@ -0,0 +1,248 @@ +UpdateAllianceMoons(); + $this->UpdateRentalMoons(); + } + + private function IsRMoon($firstOre, $secondOre, $thirdOre, $fourthOre) { + $rMoons = [ + 'Carnotite', + 'Zircon', + 'Pollucite', + 'Cinnabar', + 'Xenotime', + 'Monazite', + 'Loparite', + 'Ytterbite', + ]; + + if(in_array($firstOre, $rMoons) || in_array($secondOre, $rMoons) || in_array($thirdOre, $rMoons) || in_array($fourthOre, $rMoons)) { + return true; + } else { + return false; + } + } + + private function FindRegion($system) { + $catch = [ + '6X7-JO', + 'A-803L', + 'I-8D0G', + 'WQH-4K', + 'GJ0-OJ', + 'JWZ2-V', + 'J-ODE7', + 'OGL8-Q', + 'R-K4QY', + 'Q-S7ZD' + ]; + + $immensea = [ + 'ZBP-TP', + 'DY-P7Q', + 'XVV-21', + '78TS-Q', + 'GXK-7F', + 'CJNF-J', + 'EA-HSA', + 'FYI-49', + 'WYF8-8', + 'B9E-H6', + 'JDAS-0', + 'Y19P-1', + 'LN-56V', + 'O7-7UX', + 'Y2-QUV', + 'SPBS-6', + 'A4B-V5', + 'NS2L-4', + 'AF0-V5', + 'B-S347', + 'PPFB-U', + 'B-A587', + 'QI-S9W', + 'L-5JCJ', + '4-GB14', + 'REB-KR', + 'QE-E1D', + 'LK1K-5', + 'Z-H2MA', + 'B-KDOZ', + 'E8-YS9', + ]; + + if(in_array($system, $catch)) { + return 'Catch'; + } else if(in_array($system, $immensea)) { + return 'Immensea'; + } else { + return null; + } + } + + private function UpdateRentalMoons() { + $lines = array(); + + //Create the file handler + $data = Storage::get('public/moon_data.txt'); + //Split the string into separate arrays based on the line + $data = preg_split("/\n/", $data); + + //For each array of data, let's separate the data into more arrays built in arrays + for($i = 0; $i < sizeof($data); $i++) { + //Strip the beginning [ from the line + $temp = str_replace('[', '', $data[$i]); + //Strip the ending ] from the line + $temp = str_replace(']', '', $temp); + //Remove the spacees from the line + $temp = str_replace(' ', '', $temp); + //Remove the quotes from the line + $temp = str_replace("'", '', $temp); + //Split up the line into separate arrays after each comma + $lines[$i] = preg_split("/,/", $temp); + } + + /** + * The output within the lines array + * 0 => System + * 1 => Planet + * 2 => Moon + * 3 => FirstOre + * 4 => FirstQuan + * 5 => SecondOre + * 6 => SecondQuan + * 7 => ThirdOre + * 8 => ThirdQuan + * 9 => FourthOre + * 10 => FourthQuan + */ + + foreach($lines as $line) { + //If the moon is a rare moon, then either update it or add it. + if($this->IsRMoon($line[3], $line[5], $line[7], $line[9])) { + $count = RentalMoon::where([ + 'System' => $line[0], + 'Planet' => $line[1], + 'Moon' => $line[2], + ])->count(); + //Insert the moon into the database + if($count == 0) { + $region = $this->FindRegion($line[0]); + + RentalMoon::insert([ + 'Region' => $region, + 'System' => $line[0], + 'Planet' => $line[1], + 'Moon' => $line[2], + 'StructureName' => 'No Name', + 'FirstOre' => $line[3], + 'FirstQuantity' => $line[4], + 'SecondOre' => $line[5], + 'SecondQuantity' => $line[6], + 'ThirdOre' => $line[7], + 'ThirdQuantity' => $line[8], + 'FourthOre' => $line[9], + 'FourthQuantity' => $line[10], + ]); + } else if($count > 0) { //If the moon is found then update it. + $firstQuantity = round($line[4] * 100); + $secondQuantity = round($line[6] * 100); + $thirdQuantity = round($line[8] * 100); + $fourthQuantity = round($line[10] * 100); + + RentalMoon::where([ + 'System' => $line[0], + 'Planet' => $line[1], + 'Moon' => $line[2], + ])->update([ + 'FirstOre' => $line[3], + 'FirstQuantity' => $firstQuantity, + 'SecondOre' => $line[5], + 'SecondQuantity' => $secondQuantity, + 'ThirdOre' => $line[7], + 'ThirdQuantity' => $thirdQuantity, + 'FourthOre' => $line[9], + 'FourthQuantity' => $fourthQuantity, + ]); + } + + } + } + } + + private function UpdateAllianceMoons() { + $lines = array(); + + //Create the file handler + $data = Storage::get('public/moon_data.txt'); + //Split the string into separate arrays based on the line + $data = preg_split("/\n/", $data); + + //For each array of data, let's separate the data into more arrays built in arrays + for($i = 0; $i < sizeof($data); $i++) { + //Strip the beginning [ from the line + $temp = str_replace('[', '', $data[$i]); + //Strip the ending ] from the line + $temp = str_replace(']', '', $temp); + //Remove the spacees from the line + $temp = str_replace(' ', '', $temp); + //Remove the quotes from the line + $temp = str_replace("'", '', $temp); + //Split up the line into separate arrays after each comma + $lines[$i] = preg_split("/,/", $temp); + } + + /** + * The output within the lines array + * 0 => System + * 1 => Planet + * 2 => Moon + * 3 => FirstOre + * 4 => FirstQuan + * 5 => SecondOre + * 6 => SecondQuan + * 7 => ThirdOre + * 8 => ThirdQuan + * 9 => FourthOre + * 10 => FourthQuan + */ + + foreach($lines as $line) { + //Update the alliance moons + AllianceMoon::where([ + 'System' => $line[0], + 'Planet' => $line[1], + 'Moon' => $line[2], + ])->update([ + 'FirstOre' => $line[3], + 'FirstQuantity' => $line[4], + 'SecondOre' => $line[5], + 'SecondQuantity' => $line[6], + 'ThirdOre' => $line[7], + 'ThirdQuantity' => $line[8], + 'FourthOre' => $line[9], + 'FourthQuantity' => $line[10], + ]); + } + } + } +} diff --git a/database/seeders/OreCompositionSeeder.php b/database/seeders/OreCompositionSeeder.php new file mode 100644 index 0000000..3e44458 --- /dev/null +++ b/database/seeders/OreCompositionSeeder.php @@ -0,0 +1,17 @@ +FetchNewPrices(); + $this->UpdateItemPricing(); + } + + private function UpdateItemPricing() { + $config = DB::table('Config')->first(); + $refineRate = $config->RefineRate / 100.00; + $time = Carbon::now(); + + //Get the price of the basic minerals + $tritaniumPrice = MineralPrice::where(['ItemId' => 34])->whereDate('Time', '>', $pastTime)->avg('Price'); + $pyeritePrice = MineralPrice::where(['ItemId' => 35])->whereDate('Time', '>', $pastTime)->avg('Price'); + $mexallonPrice = MineralPrice::where(['ItemId' => 36])->whereDate('Time', '>', $pastTime)->avg('Price'); + $isogenPrice = MineralPrice::where(['ItemId' => 37])->whereDate('Time', '>', $pastTime)->avg('Price'); + $nocxiumPrice = MineralPrice::where(['ItemId' => 38])->whereDate('Time', '>', $pastTime)->avg('Price'); + $zydrinePrice = MineralPrice::where(['ItemId' => 39])->whereDate('Time', '>', $pastTime)->avg('Price'); + $megacytePrice = MineralPrice::where(['ItemId' => 40])->whereDate('Time', '>', $pastTime)->avg('Price'); + $morphitePrice = MineralPrice::where(['ItemId' => 11399])->whereDate('Time', '>', $pastTime)->avg('Price'); + $heliumIsotopesPrice = MineralPrice::where(['ItemId' => 16274])->whereDate('Time', '>', $pastTime)->avg('Price'); + $nitrogenIsotopesPrice = MineralPrice::where(['ItemId' => 17888])->whereDate('Time', '>', $pastTime)->avg('Price'); + $oxygenIsotopesPrice = MineralPrice::where(['ItemId' => 17887])->whereDate('Time', '>', $pastTime)->avg('Price'); + $hydrogenIsotopesPrice = MineralPrice::where(['ItemId' => 17889])->whereDate('Time', '>', $pastTime)->avg('Price'); + $liquidOzonePrice = MineralPrice::where(['ItemId' => 16273])->whereDate('Time', '>', $pastTime)->avg('Price'); + $heavyWaterPrice = MineralPrice::where(['ItemId' => 16272])->whereDate('Time', '>', $pastTime)->avg('Price'); + $strontiumClathratesPrice = MineralPrice::where(['ItemId' => 16275])->whereDate('Time', '>', $pastTime)->avg('Price'); + //Get the price of the moongoo + $atmosphericGasesPrice = MineralPrice::where(['ItemId' => 16634])->whereDate('Time', '>', $pastTime)->avg('Price'); + $evaporiteDepositsPirce = MineralPrice::where(['ItemId' => 16635])->whereDate('Time', '>', $pastTime)->avg('Price'); + $hydrocarbonsPrice = MineralPrice::where(['ItemId' => 16633])->whereDate('Time', '>', $pastTime)->avg('Price'); + $silicatesPrice = MineralPrice::where(['ItemId' => 16636])->whereDate('Time', '>', $pastTime)->avg('Price'); + $cobaltPrice = MineralPrice::where(['ItemId' => 16640])->whereDate('Time', '>', $pastTime)->avg('Price'); + $scandiumPrice = MineralPrice::where(['ItemId' => 16639])->whereDate('Time', '>', $pastTime)->avg('Price'); + $titaniumPrice = MineralPrice::where(['ItemId' => 16638])->whereDate('Time', '>', $pastTime)->avg('Price'); + $tungstenPrice = MineralPrice::where(['ItemId' => 16637])->whereDate('Time', '>', $pastTime)->avg('Price'); + $cadmiumPrice = MineralPrice::where(['ItemId' => 16643])->whereDate('Time', '>', $pastTime)->avg('Price'); + $platinumPrice = MineralPrice::where(['ItemId' => 16644])->whereDate('Time', '>', $pastTime)->avg('Price'); + $vanadiumPrice = MineralPrice::where(['ItemId' => 16642])->whereDate('Time', '>', $pastTime)->avg('Price'); + $chromiumPrice = MineralPrice::where(['ItemId' => 16641])->whereDate('Time', '>', $pastTime)->avg('Price'); + $technetiumPrice = MineralPrice::where(['ItemId' => 16649])->whereDate('Time', '>', $pastTime)->avg('Price'); + $hafniumPrice = MineralPrice::where(['ItemId' => 16648])->whereDate('Time', '>', $pastTime)->avg('Price'); + $caesiumPrice = MineralPrice::where(['ItemId' => 16647])->whereDate('Time', '>', $pastTime)->avg('Price'); + $mercuryPrice = MineralPrice::where(['ItemId' => 16646])->whereDate('Time', '>', $pastTime)->avg('Price'); + $dysprosiumPrice = MineralPrice::where(['ItemId' => 16650])->whereDate('Time', '>', $pastTime)->avg('Price'); + $neodymiumPrice = MineralPrice::where(['ItemId' => 16651])->whereDate('Time', '>', $pastTime)->avg('Price'); + $promethiumPrice = MineralPrice::where(['ItemId' => 16652])->whereDate('Time', '>', $pastTime)->avg('Price'); + $thuliumPrice = MineralPrice::where(['ItemId' => 16653])->whereDate('Time', '>', $pastTime)->avg('Price'); + + + //Get the item compositions + $items = DB::select('SELECT Name,ItemId FROM ore_composition'); + //Go through each of the items and update the price + foreach($items as $item) { + //Get the item composition + $composition = OreComposition::where('ItemId', $item->ItemId)->first(); + + //Calculate the Batch Price + $batchPrice = ( ($composition->Tritanium * $tritaniumPrice) + + ($composition->Pyerite * $pyeritePrice) + + ($composition->Mexallon * $mexallonPrice) + + ($composition->Isogen * $isogenPrice) + + ($composition->Nocxium * $nocxiumPrice) + + ($composition->Zydrine * $zydrinePrice) + + ($composition->Megacyte * $megacytePrice) + + ($composition->Morphite * $morphitePrice) + + ($composition->HeavyWater * $heavyWaterPrice) + + ($composition->LiquidOzone * $liquidOzonePrice) + + ($composition->NitrogenIsotopes * $nitrogenIsotopesPrice) + + ($composition->HeliumIsotopes * $heliumIsotopesPrice) + + ($composition->HydrogenIsotopes * $hydrogenIsotopesPrice) + + ($composition->OxygenIsotopes * $oxygenIsotopesPrice) + + ($composition->StrontiumClathrates * $strontiumClathratesPrice) + + ($composition->AtmosphericGases * $atmosphericGasesPrice) + + ($composition->EvaporiteDeposits * $evaporiteDepositsPirce) + + ($composition->Hydrocarbons * $hydrocarbonsPrice) + + ($composition->Silicates * $silicatesPrice) + + ($composition->Cobalt * $cobaltPrice) + + ($composition->Scandium * $scandiumPrice) + + ($composition->Titanium * $titaniumPrice) + + ($composition->Tungsten * $tungstenPrice) + + ($composition->Cadmium * $cadmiumPrice) + + ($composition->Platinum * $platinumPrice) + + ($composition->Vanadium * $vanadiumPrice) + + ($composition->Chromium * $chromiumPrice)+ + ($composition->Technetium * $technetiumPrice) + + ($composition->Hafnium * $hafniumPrice) + + ($composition->Caesium * $caesiumPrice) + + ($composition->Mercury * $mercuryPrice) + + ($composition->Dysprosium * $dysprosiumPrice) + + ($composition->Neodymium * $neodymiumPrice) + + ($composition->Promethium * $promethiumPrice) + + ($composition->Thulium * $thuliumPrice)); + + //Calculate the batch price with the refine rate included + //Batch Price is base price for everything + $batchPrice = $batchPrice * $refineRate; + + //Calculate the unit price + $price = $batchPrice / $composition->BatchSize; + + //Calculate the m3 price + $m3Price = $price / $composition->m3Size; + + //Insert the prices into the Prices table + $ore = new OrePrice; + $ore->Name = $composition->Name; + $ore->ItemId = $composition->ItemId; + $ore->BatchPrice = $batchPrice; + $ore->UnitPrice = $price; + $ore->m3Price = $m3Price; + $ore->Time = $time; + $ore->save(); + } + } + + private function FetchNewPrices() { + $ItemIDs = array( + "Tritanium" => 34, + "Pyerite" => 35, + "Mexallon" => 36, + "Isogen" => 37, + "Nocxium" => 38, + "Zydrine" => 39, + "Megacyte" => 40, + "Morphite" => 11399, + "HeliumIsotopes" => 16274, + "NitrogenIsotopes" => 17888, + "OxygenIsotopes" => 17887, + "HydrogenIsotopes" => 17889, + "LiquidOzone" => 16273, + "HeavyWater" => 16272, + "StrontiumClathrates" => 16275, + "AtmosphericGases" => 16634, + "EvaporiteDeposits" => 16635, + "Hydrocarbons" => 16633, + "Silicates" => 16636, + "Cobalt" => 16640, + "Scandium" => 16639, + "Titanium" => 16638, + "Tungsten" => 16637, + "Cadmium" => 16643, + "Platinum" => 16644, + "Vanadium" => 16642, + "Chromium" => 16641, + "Technetium" => 16649, + "Hafnium" => 16648, + "Caesium" => 16647, + "Mercury" => 16646, + "Dysprosium" => 16650, + "Neodymium" => 16651, + "Promethium" => 16652, + "Thulium" => 16653, + ); + $time = time(); + $item = array(); + //Get the json data for each ItemId from https://market.fuzzwork.co.uk/api/ + //Base url is https://market.fuzzwork.co.uk/aggregates/?region=10000002&types=34 + //Going to use curl for these requests + foreach($ItemIDs as $key => $value) { + $client = new Client(['base_uri' => 'https://market.fuzzwork.co.uk/aggregates/']); + $uri = '?region=10000002&types=' . $value; + $result = $client->request('GET', $uri); + $item = json_decode($result->getBody(), true); + + DB::table('Prices')->insert([ + 'Name' => $key, + 'ItemId' => $value, + 'Price' => $item[$value]['sell']['median'], + 'Time' => $time + ]); + } + } +} diff --git a/database/seeders/SRPTableSeeder.php b/database/seeders/SRPTableSeeder.php new file mode 100644 index 0000000..637e6cf --- /dev/null +++ b/database/seeders/SRPTableSeeder.php @@ -0,0 +1,110 @@ +insert([ + 'code' => 'None', + 'description' => 'None', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'T1FDC', + 'description' => 'T1 Frig / Dessie / Cruiser', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'T1BC', + 'description' => 'T1 Battelcruiser', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'T2F', + 'description' => 'T2 Frigate', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'T3D', + 'description' => 'T3 Destroyer', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'T1T2Logi', + 'description' => 'T1 & T2 Logistics', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'RI', + 'description' => 'Recons / Interdictors', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'T2C', + 'description' => 'T2 Cruiser', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'T3C', + 'description' => 'T3 Cruiser', + ]); + + DB::table('srp_ship_types')->insert([ + 'code' => 'COM', + 'description' => 'Command Ship', + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'T1FDC', + 'payout' => 75.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'T1BC', + 'payout' => 60.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'T2F', + 'payout' => 60.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'T3D', + 'payout' => 60.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'T1T2Logi', + 'payout' => 100.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'RI', + 'payout' => 50.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'T2C', + 'payout' => 50.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'T3C', + 'payout' => 50.00, + ]); + + DB::table('srp_payouts')->insert([ + 'code' => 'COM', + 'payout' => 100.00, + ]); + } +} diff --git a/database/seeders/SolarSystemSeeder.php b/database/seeders/SolarSystemSeeder.php new file mode 100644 index 0000000..7bcfff9 --- /dev/null +++ b/database/seeders/SolarSystemSeeder.php @@ -0,0 +1,40 @@ +SetupAuthentication(); + $systems = $esi->invoke('get', '/universe/systems/'); + + foreach($systems as $system) { + try { + $info = $esi->invoke('get', '/universe/systems/{system_id}/', [ + 'system_id' => $system, + ]); + } catch(RequestFailedException $e) { + return null; + } + + DB::updateOrCrate([ + 'solar_system_id' => $system, + ],[ + 'name' => $info->name, + 'solar_system_id' => $system, + ]); + } + } +} diff --git a/database/seeders/WikiTableSeeder.php b/database/seeders/WikiTableSeeder.php new file mode 100644 index 0000000..c9edf7e --- /dev/null +++ b/database/seeders/WikiTableSeeder.php @@ -0,0 +1,47 @@ +insert([ + 'login' => 'nologin', + 'pass' => 'nopass', + 'name' => 'nologin', + ]); + + DB::table('wiki_groupnames')->insert([ + 'id' => '1', + 'gname' => 'user', + ]); + + DB::table('wiki_gropunames')->insert([ + 'id' => '2', + 'gname' => 'it', + ]); + + DB::table('wiki_groupnames')->insert([ + 'id' => '3', + 'gname' => 'fc', + ]); + + DB::table('wiki_groupnames')->insert([ + 'id' => '4', + 'gname' => 'admin', + ]); + + DB::table('wiki_member')->insert([ + 'uid' => '1', + 'gid' => '1', + 'groupname' => 'user', + ]); + } +} diff --git a/database/seeders/WormholeTypeSeeder.php b/database/seeders/WormholeTypeSeeder.php new file mode 100644 index 0000000..253eeb5 --- /dev/null +++ b/database/seeders/WormholeTypeSeeder.php @@ -0,0 +1,925 @@ +insert([ + 'type' => 'A009', + 'type' => 'C13', + 'leads_to' => 'W-Space', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'A239', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'A641', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 2000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'A982', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'B041', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 5000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 48, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'B274', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'B449', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 2000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'B520', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 5000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'B735', + 'type' => 'Drifter', + 'leads_to' => 'Barbican', + 'mass_allowed' => 750000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'C008', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 500000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'C125', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'C140', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'C247', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'C248', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 5000000000, + 'individual_mass' => 1800000000, + 'regeneration' => 500000000, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'C391', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 5000000000, + 'individual_mass' => 1800000000, + 'regeneration' => 500000000, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'C414', + 'type' => 'Drifter', + 'leads_to' => 'Conflux', + 'mass_allowed' => 750000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'D364', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'D382', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'D792', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'D845', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'E004', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 500000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'E175', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 500000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'E545', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'E587', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'F135', + 'type' => 'Thera', + 'leads_to' => 'Thera', + 'mass_allowed' => 750000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'F353', + 'type' => 'Thera', + 'leads_to' => 'Thera', + 'mass_allowed' => 100000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'F355', + 'type' => 'Thera', + 'leads_to' => 'Thera', + 'mass_allowed' => 100000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'G008', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 500000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'G024', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'H121', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'H296', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'H900', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'I182', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'J244', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'K162', + 'type' => 'Exit WH', + 'leads_to' => 'Exit', + 'mass_allowed' => 0, + 'individual_mass' => 0, + 'regeneration' => 0, + 'max_stable_time' => 0, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'K329', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 5000000000, + 'individual_mass' => 1800000000, + 'regeneration' => 500000000, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'K346', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'L005', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 500000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'L031', + 'type' => 'Thera', + 'leads_to' => 'Thera', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'L477', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'L614', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'M001', + 'type' => 'C4', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 500000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'M164', + 'type' => 'Thera', + 'leads_to' => 'Thera', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'M267', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'M555', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'M609', + 'type' => 'C4', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N062', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N110', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N290', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 5000000000, + 'individual_mass' => 1800000000, + 'regeneration' => 500000000, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N432', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N766', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N770', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N944', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'N968', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'O128', + 'type' => 'C4', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 300000000, + 'regeneration' => 100000000, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'O477', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'O883', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'P060', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Q003', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 500000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Q063', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Q317', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'R051', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'R259', + 'type' => 'Drifter', + 'leads_to' => 'Redoubt', + 'mass_allowed' => 750000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'R474', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'R943', + 'type' => 'C2', + 'leads_to' => 'W-Space', + 'mass_allowed' => 750000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'S047', + 'type' => 'C7', + 'leads_to' => 'Highsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'S199', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'S804', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'S877', + 'type' => 'Drifter', + 'leads_to' => 'Sentinel', + 'mass_allowed' => 750000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'T405', + 'type' => 'C4', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'T458', + 'type' => 'Thera', + 'leads_to' => 'Thera', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'U210', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'U319', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1800000000, + 'regeneration' => 500000000, + 'max_stable_time' => 48, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'U574', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'V283', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1000000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'V301', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'V753', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'V898', + 'type' => 'C8', + 'leads_to' => 'Lowsec', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'V911', + 'type' => 'C5', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'V928', + 'type' => 'Drifter', + 'leads_to' => 'Vidette', + 'mass_allowed' => 750000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'W237', + 'type' => 'C6', + 'leads_to' => 'W-Space', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'X702', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'X877', + 'type' => 'C4', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Y683', + 'type' => 'C4', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Y790', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Z006', + 'type' => 'C3', + 'leads_to' => 'W-Space', + 'mass_allowed' => 1000000000, + 'individual_mass' => 5000000, + 'regeneration' => 5000000, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Z060', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 1000000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Z142', + 'type' => 'C9', + 'leads_to' => 'Nullsec', + 'mass_allowed' => 3000000000, + 'individual_mass' => 1350000000, + 'regeneration' => 0, + 'max_stable_time' => 24, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Z457', + 'type' => 'C4', + 'leads_to' => 'W-Space', + 'mass_allowed' => 2000000000, + 'individual_mass' => 300000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Z647', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 500000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + + DB::table('wormhole_types')->insert([ + 'type' => 'Z971', + 'type' => 'C1', + 'leads_to' => 'W-Space', + 'mass_allowed' => 100000000, + 'individual_mass' => 20000000, + 'regeneration' => 0, + 'max_stable_time' => 16, + ]); + } +} diff --git a/resources/views/dashboard/dashboard.blade.php b/resources/views/dashboard/dashboard.blade.php index ba61917..6ea42cc 100644 --- a/resources/views/dashboard/dashboard.blade.php +++ b/resources/views/dashboard/dashboard.blade.php @@ -1,27 +1,144 @@ - - - - - - Dashboard - - -
-
-

Hello World

- -
- @csrf - -
+@extends('layouts.user.dashb4') +@section('content') +
+
+
+
+

Information

+
+
+ This page displays the Scopes, Permissions, and Roles you currently have on the services site.
+ By clicking on the Register Alt link you can add alts for SRP management.
- -

Logged in as: {{ auth()->user()->character_name }} ({{ auth()->user()->character_id }})

-

Privileges version: {{ auth()->user()->privileges_version }}

-

JWT issued at: {{ optional(auth()->user()->user_jwt_issued_at)?->toDateTimeString() }}

-

JWT expires at: {{ optional(auth()->user()->user_jwt_expires_at)?->toDateTimeString() }}

-

Auth ID: {{ $characterId }}

-
- - \ No newline at end of file +
+
+
+
+
+
+
+

Scopes

+
+
+ + + + + + @if($scopeCount > 0) + @foreach($scopes as $scope) + + + + @endforeach + @else + + + + @endif + +
Scope
{{ $scope->scope }}
No Scopes
+
+
+
+
+
+
+

Permissions

+
+
+ + + + + + @if($permissionCount > 0) + @foreach($permissions as $permission) + + + + @endforeach + @else + + + + @endif + +
Permission
{{ $permission->permission }}
No Permissions
+
+
+
+
+
+
+

Roles

+
+
+ + + + + + @if($roleCount > 0) + @foreach($roles as $role) + + + + @endforeach + @else + + + + @endif + +
Role
{{ $role->role }}
No Role
+
+
+
+
+
+
+
+ + + + + + + + @if($altCount > 0) + @foreach($alts as $alt) + {{ Form::open(['action' => 'Dashboard\DashboardController@removeAlt', 'method' => 'POST']) }} + + + + + + {{ Form::close() }} + @endforeach + @else + + + + + @endif + +
Alt NameCharacter IdRemove
{{ $alt->name }}{{ $alt->character_id }} + {{ Form::hidden('character', $alt->character_id) }} + {{ Form::submit('Remove Alt', ['class' => 'btn btn-primary']) }} +
No Alts on Record
+
+
+
+
+
+

Register Alts for SRP Form and Mining Taxes

+
+
+ +
+
+
+
+@endsection \ No newline at end of file diff --git a/resources/views/errors/401.blade.php b/resources/views/errors/401.blade.php new file mode 100644 index 0000000..f94f82f --- /dev/null +++ b/resources/views/errors/401.blade.php @@ -0,0 +1,11 @@ +@extends('errors::illustrated-layout') + +@section('code', '401') +@section('title', __('Unauthorized')) + +@section('image') +
+
+@endsection + +@section('message', __('Sorry, you are not authorized to access this page.')) \ No newline at end of file diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php new file mode 100644 index 0000000..00ad810 --- /dev/null +++ b/resources/views/errors/403.blade.php @@ -0,0 +1,11 @@ +@extends('errors::illustrated-layout') + +@section('code', '403') +@section('title', __('Forbidden')) + +@section('image') +
+
+@endsection + +@section('message', __($exception->getMessage() ?: __('Sorry, you are forbidden from accessing this page.'))) \ No newline at end of file diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php new file mode 100644 index 0000000..33e8fb2 --- /dev/null +++ b/resources/views/errors/404.blade.php @@ -0,0 +1,11 @@ +@extends('errors::illustrated-layout') + +@section('code', '404') +@section('title', __('Page Not Found')) + +@section('image') +
+
+@endsection + +@section('message', __('Sorry, the page you are looking for could not be found.')) \ No newline at end of file diff --git a/resources/views/errors/419.blade.php b/resources/views/errors/419.blade.php new file mode 100644 index 0000000..33e8fb2 --- /dev/null +++ b/resources/views/errors/419.blade.php @@ -0,0 +1,11 @@ +@extends('errors::illustrated-layout') + +@section('code', '404') +@section('title', __('Page Not Found')) + +@section('image') +
+
+@endsection + +@section('message', __('Sorry, the page you are looking for could not be found.')) \ No newline at end of file diff --git a/resources/views/errors/429.blade.php b/resources/views/errors/429.blade.php new file mode 100644 index 0000000..8861baa --- /dev/null +++ b/resources/views/errors/429.blade.php @@ -0,0 +1,11 @@ +@extends('errors::illustrated-layout') + +@section('code', '429') +@section('title', __('Too Many Requests')) + +@section('image') +
+
+@endsection + +@section('message', __('Sorry, you are making too many requests to our servers.')) \ No newline at end of file diff --git a/resources/views/errors/500.blade.php b/resources/views/errors/500.blade.php new file mode 100644 index 0000000..6c617a5 --- /dev/null +++ b/resources/views/errors/500.blade.php @@ -0,0 +1,11 @@ +@extends('errors::illustrated-layout') + +@section('code', '500') +@section('title', __('Error')) + +@section('image') +
+
+@endsection + +@section('message', __('Whoops, something went wrong on our servers.')) \ No newline at end of file diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php new file mode 100644 index 0000000..11a5f33 --- /dev/null +++ b/resources/views/errors/503.blade.php @@ -0,0 +1,11 @@ +@extends('errors::illustrated-layout') + +@section('code', '503') +@section('title', __('Service Unavailable')) + +@section('image') +
+
+@endsection + +@section('message', __($exception->getMessage() ?: __('Sorry, we are doing some maintenance. Please check back soon.'))) \ No newline at end of file diff --git a/resources/views/errors/illustrated-layout.blade.php b/resources/views/errors/illustrated-layout.blade.php new file mode 100644 index 0000000..0bbf179 --- /dev/null +++ b/resources/views/errors/illustrated-layout.blade.php @@ -0,0 +1,486 @@ + + + + @yield('title') + + + + + + + + + + + + +
+
+
+
+ @yield('code', __('Oh no')) +
+ +
+ +

+ @yield('message') +

+ + + + +
+
+ +
+ @yield('image') +
+
+ + \ No newline at end of file diff --git a/resources/views/errors/layout.blade.php b/resources/views/errors/layout.blade.php new file mode 100644 index 0000000..c80a0a3 --- /dev/null +++ b/resources/views/errors/layout.blade.php @@ -0,0 +1,57 @@ + + + + + + + @yield('title') + + + + + + + + + +
+
+
+ @yield('message') +
+
+
+ + \ No newline at end of file diff --git a/resources/views/errors/minimal.blade.php b/resources/views/errors/minimal.blade.php new file mode 100644 index 0000000..b39963a --- /dev/null +++ b/resources/views/errors/minimal.blade.php @@ -0,0 +1,62 @@ + + + + + + + @yield('title') + + + + + + + + + +
+
+ @yield('code') +
+ +
+ @yield('message') +
+
+ + \ No newline at end of file diff --git a/resources/views/layouts/admin/b4.blad.ephp b/resources/views/layouts/admin/b4.blad.ephp new file mode 100644 index 0000000..8e962a2 --- /dev/null +++ b/resources/views/layouts/admin/b4.blad.ephp @@ -0,0 +1,15 @@ + + +@include('layouts.admin.dashboard.head') + +
+@include('layouts.admin.dashboard.navbar') +@include('layouts.admin.dashboard.main') +@include('layouts.admin.dashboard.content') +@include('layouts.admin.dashboard.control') +@include('layouts.admin.dashboard.footer') +
+ +@include('layouts.admin.dashboard.scripts') + + \ No newline at end of file diff --git a/resources/views/layouts/admin/dashboard/content.blade.php b/resources/views/layouts/admin/dashboard/content.blade.php new file mode 100644 index 0000000..9a5399a --- /dev/null +++ b/resources/views/layouts/admin/dashboard/content.blade.php @@ -0,0 +1,11 @@ + +
+ + @include('inc.messages') + +
+ @yield('content') +
+ +
+ \ No newline at end of file diff --git a/resources/views/layouts/admin/dashboard/control.blade.php b/resources/views/layouts/admin/dashboard/control.blade.php new file mode 100644 index 0000000..e678b08 --- /dev/null +++ b/resources/views/layouts/admin/dashboard/control.blade.php @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/resources/views/layouts/admin/dashboard/footer.blade.php b/resources/views/layouts/admin/dashboard/footer.blade.php new file mode 100644 index 0000000..c50be53 --- /dev/null +++ b/resources/views/layouts/admin/dashboard/footer.blade.php @@ -0,0 +1,15 @@ + +
+ +
+ @hasSection('footer-right') + @yeild('footer-right') + @endif +
+ @hasSection('footer-center') + @yeild('footer-center') + @endif + @hasSection('footer-left') + @yeild('footer-left') + @endif +
\ No newline at end of file diff --git a/resources/views/layouts/admin/dashboard/head.blade.php b/resources/views/layouts/admin/dashboard/head.blade.php new file mode 100644 index 0000000..bdb4a0b --- /dev/null +++ b/resources/views/layouts/admin/dashboard/head.blade.php @@ -0,0 +1,31 @@ + + + + + + {{ config('app.name', 'W4RP Services') }} + + + + + + + + + + + + + + + + @hasSection('header') + @yield('header') + @endif + \ No newline at end of file diff --git a/resources/views/layouts/admin/dashboard/main.blade.php b/resources/views/layouts/admin/dashboard/main.blade.php new file mode 100644 index 0000000..1732fb9 --- /dev/null +++ b/resources/views/layouts/admin/dashboard/main.blade.php @@ -0,0 +1,37 @@ + + \ No newline at end of file diff --git a/resources/views/layouts/admin/dashboard/navbar.blade.php b/resources/views/layouts/admin/dashboard/navbar.blade.php new file mode 100644 index 0000000..c3991a3 --- /dev/null +++ b/resources/views/layouts/admin/dashboard/navbar.blade.php @@ -0,0 +1,37 @@ + + + \ No newline at end of file diff --git a/resources/views/layouts/admin/dashboard/scripts.blade.php b/resources/views/layouts/admin/dashboard/scripts.blade.php new file mode 100644 index 0000000..b90ffeb --- /dev/null +++ b/resources/views/layouts/admin/dashboard/scripts.blade.php @@ -0,0 +1,11 @@ + + + + + + + + +@hasSection('scripts') +@yield('scripts') +@endif \ No newline at end of file diff --git a/resources/views/layouts/admin/sidebarmenu/contract.blade.php b/resources/views/layouts/admin/sidebarmenu/contract.blade.php new file mode 100644 index 0000000..33dd73e --- /dev/null +++ b/resources/views/layouts/admin/sidebarmenu/contract.blade.php @@ -0,0 +1,33 @@ + +@if(auth()->user()->hasPermission('contract.admin')) + +@endif + \ No newline at end of file diff --git a/resources/views/layouts/admin/sidebarmenu/general.blade.php b/resources/views/layouts/admin/sidebarmenu/general.blade.php new file mode 100644 index 0000000..f918611 --- /dev/null +++ b/resources/views/layouts/admin/sidebarmenu/general.blade.php @@ -0,0 +1,39 @@ + +@if(auth()->user()->hasRole('Admin')) + +@endif + \ No newline at end of file diff --git a/resources/views/layouts/admin/sidebarmenu/miningtax.blade.php b/resources/views/layouts/admin/sidebarmenu/miningtax.blade.php new file mode 100644 index 0000000..7826a3e --- /dev/null +++ b/resources/views/layouts/admin/sidebarmenu/miningtax.blade.php @@ -0,0 +1,29 @@ +@if(auth()->user()->hasPermission('mining.officer')) + +@endif \ No newline at end of file diff --git a/resources/views/layouts/admin/sidebarmenu/rentaltax.blade.php b/resources/views/layouts/admin/sidebarmenu/rentaltax.blade.php new file mode 100644 index 0000000..30c87b2 --- /dev/null +++ b/resources/views/layouts/admin/sidebarmenu/rentaltax.blade.php @@ -0,0 +1,27 @@ + +@if(auth()->user()->hasRole('Admin')) +