diff --git a/README.md b/README.md index 1ebf3b222..6b83639d6 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ - Stripe Integration - Referral System - Ticket System -- Upgrade/Downgrade Server Ressources +- Upgrade/Downgrade Server Resources - Store (credit system with hourly billing and invoices) - Email Verification - Audit Log - Admin Dashboard - User/Server Management -- Customizable server plans +- Customisable server plans - Vouchers - and so much more! diff --git a/app/Classes/Pterodactyl.php b/app/Classes/Pterodactyl.php index 95893dca6..89ae028c4 100644 --- a/app/Classes/Pterodactyl.php +++ b/app/Classes/Pterodactyl.php @@ -5,8 +5,9 @@ use App\Models\Egg; use App\Models\Nest; use App\Models\Node; -use App\Models\Server; use App\Models\Product; +use App\Models\Server; +use App\Models\User; use Exception; use Illuminate\Http\Client\PendingRequest; use Illuminate\Http\Client\Response; @@ -22,136 +23,160 @@ class Pterodactyl public static function client() { return Http::withHeaders([ - 'Authorization' => 'Bearer ' . config("SETTINGS::SYSTEM:PTERODACTYL:TOKEN"), - 'Content-type' => 'application/json', - 'Accept' => 'Application/vnd.pterodactyl.v1+json', - ])->baseUrl(config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/api'); + 'Authorization' => 'Bearer ' . config('SETTINGS::SYSTEM:PTERODACTYL:TOKEN'), + 'Content-type' => 'application/json', + 'Accept' => 'Application/vnd.pterodactyl.v1+json', + ])->baseUrl(config('SETTINGS::SYSTEM:PTERODACTYL:URL') . '/api'); } public static function clientAdmin() { return Http::withHeaders([ - 'Authorization' => 'Bearer ' . config("SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN"), - 'Content-type' => 'application/json', - 'Accept' => 'Application/vnd.pterodactyl.v1+json', - ])->baseUrl(config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/api'); + 'Authorization' => 'Bearer ' . config('SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN'), + 'Content-type' => 'application/json', + 'Accept' => 'Application/vnd.pterodactyl.v1+json', + ])->baseUrl(config('SETTINGS::SYSTEM:PTERODACTYL:URL') . '/api'); } + /** * @return Exception */ - private static function getException(string $message = "", int $status = 0): Exception + private static function getException(string $message = '', int $status = 0): Exception { if ($status == 404) { - return new Exception("Ressource does not exist on pterodactyl - " . $message, 404); + return new Exception('Ressource does not exist on pterodactyl - ' . $message, 404); } if ($status == 403) { - return new Exception("No permission on pterodactyl, check pterodactyl token and permissions - " . $message, 403); + return new Exception('No permission on pterodactyl, check pterodactyl token and permissions - ' . $message, 403); } if ($status == 401) { - return new Exception("No pterodactyl token set - " . $message, 401); + return new Exception('No pterodactyl token set - ' . $message, 401); } if ($status == 500) { - return new Exception("Pterodactyl server error - " . $message, 500); + return new Exception('Pterodactyl server error - ' . $message, 500); } return new Exception('Request Failed, is pterodactyl set-up correctly? - ' . $message); } /** - * @param Nest $nest + * @param Nest $nest * @return mixed + * * @throws Exception */ public static function getEggs(Nest $nest) { try { - $response = self::client()->get("/application/nests/{$nest->id}/eggs?include=nest,variables&per_page=" . config("SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT")); + $response = self::client()->get("/application/nests/{$nest->id}/eggs?include=nest,variables&per_page=" . config('SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT')); } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to get eggs from pterodactyl - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get eggs from pterodactyl - ', $response->status()); + } + return $response->json()['data']; } /** * @return mixed + * * @throws Exception */ public static function getNodes() { try { - $response = self::client()->get('/application/nodes?per_page=' . config("SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT")); + $response = self::client()->get('/application/nodes?per_page=' . config('SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT')); } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to get nodes from pterodactyl - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get nodes from pterodactyl - ', $response->status()); + } + return $response->json()['data']; } /** * @return mixed + * * @throws Exception * @description Returns the infos of a single node */ - public static function getNode($id) { + public static function getNode($id) + { try { $response = self::client()->get('/application/nodes/' . $id); - } catch(Exception $e) { + } catch (Exception $e) { throw self::getException($e->getMessage()); } - if($response->failed()) throw self::getException("Failed to get node id " . $id . " - " . $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get node id ' . $id . ' - ' . $response->status()); + } + return $response->json()['attributes']; } - - - public static function getServers() { + public static function getServers() + { try { - $response = self::client()->get('/application/servers?per_page=' . config("SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT")); + $response = self::client()->get('/application/servers?per_page=' . config('SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT')); } catch (Exception $e) { throw self::getException($e->getMessage()); } - if($response->failed()) throw self::getException("Failed to get list of servers - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get list of servers - ', $response->status()); + } + return $response->json()['data']; } /** * @return null + * * @throws Exception */ public static function getNests() { try { - $response = self::client()->get('/application/nests?per_page=' . config("SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT")); + $response = self::client()->get('/application/nests?per_page=' . config('SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT')); } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to get nests from pterodactyl", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get nests from pterodactyl', $response->status()); + } + return $response->json()['data']; } /** * @return mixed + * * @throws Exception */ public static function getLocations() { try { - $response = self::client()->get('/application/locations?per_page=' . config("SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT")); + $response = self::client()->get('/application/locations?per_page=' . config('SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT')); } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to get locations from pterodactyl - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get locations from pterodactyl - ', $response->status()); + } return $response->json()['data']; } /** - * @param Node $node + * @param Node $node * @return mixed + * * @throws Exception */ public static function getFreeAllocationId(Node $node) @@ -160,8 +185,9 @@ public static function getFreeAllocationId(Node $node) } /** - * @param Node $node + * @param Node $node * @return array|mixed|null + * * @throws Exception */ public static function getFreeAllocations(Node $node) @@ -172,7 +198,9 @@ public static function getFreeAllocations(Node $node) if (isset($response['data'])) { if (!empty($response['data'])) { foreach ($response['data'] as $allocation) { - if (!$allocation['attributes']['assigned']) array_push($freeAllocations, $allocation); + if (!$allocation['attributes']['assigned']) { + array_push($freeAllocations, $allocation); + } } } } @@ -181,8 +209,9 @@ public static function getFreeAllocations(Node $node) } /** - * @param Node $node + * @param Node $node * @return array|mixed + * * @throws Exception */ public static function getAllocations(Node $node) @@ -193,51 +222,53 @@ public static function getAllocations(Node $node) } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to get allocations from pterodactyl - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get allocations from pterodactyl - ', $response->status()); + } return $response->json(); } /** - * @param String $route + * @param string $route * @return string */ public static function url(string $route): string { - return config("SETTINGS::SYSTEM:PTERODACTYL:URL") . $route; + return config('SETTINGS::SYSTEM:PTERODACTYL:URL') . $route; } /** - * @param Server $server - * @param Egg $egg - * @param int $allocationId + * @param Server $server + * @param Egg $egg + * @param int $allocationId * @return Response */ public static function createServer(Server $server, Egg $egg, int $allocationId) { - return self::client()->post("/application/servers", [ - "name" => $server->name, - "external_id" => $server->id, - "user" => $server->user->pterodactyl_id, - "egg" => $egg->id, - "docker_image" => $egg->docker_image, - "startup" => $egg->startup, - "environment" => $egg->getEnvironmentVariables(), - "limits" => [ - "memory" => $server->product->memory, - "swap" => $server->product->swap, - "disk" => $server->product->disk, - "io" => $server->product->io, - "cpu" => $server->product->cpu + return self::client()->post('/application/servers', [ + 'name' => $server->name, + 'external_id' => $server->id, + 'user' => $server->user->pterodactyl_id, + 'egg' => $egg->id, + 'docker_image' => $egg->docker_image, + 'startup' => $egg->startup, + 'environment' => $egg->getEnvironmentVariables(), + 'limits' => [ + 'memory' => $server->product->memory, + 'swap' => $server->product->swap, + 'disk' => $server->product->disk, + 'io' => $server->product->io, + 'cpu' => $server->product->cpu, + ], + 'feature_limits' => [ + 'databases' => $server->product->databases, + 'backups' => $server->product->backups, + 'allocations' => $server->product->allocations, ], - "feature_limits" => [ - "databases" => $server->product->databases, - "backups" => $server->product->backups, - "allocations" => $server->product->allocations, + 'allocation' => [ + 'default' => $allocationId, ], - "allocation" => [ - "default" => $allocationId - ] ]); } @@ -248,7 +279,9 @@ public static function suspendServer(Server $server) } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to suspend server from pterodactyl - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to suspend server from pterodactyl - ', $response->status()); + } return $response; } @@ -260,14 +293,17 @@ public static function unSuspendServer(Server $server) } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to unsuspend server from pterodactyl - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to unsuspend server from pterodactyl - ', $response->status()); + } return $response; } /** * Get user by pterodactyl id - * @param int $pterodactylId + * + * @param int $pterodactylId * @return mixed */ public function getUser(int $pterodactylId) @@ -277,14 +313,17 @@ public function getUser(int $pterodactylId) } catch (Exception $e) { throw self::getException($e->getMessage()); } - if ($response->failed()) throw self::getException("Failed to get user from pterodactyl - ", $response->status()); + if ($response->failed()) { + throw self::getException('Failed to get user from pterodactyl - ', $response->status()); + } return $response->json()['attributes']; } /** * Get serverAttributes by pterodactyl id - * @param int $pterodactylId + * + * @param int $pterodactylId * @return mixed */ public static function getServerAttributes(int $pterodactylId, bool $deleteOn404 = false) @@ -297,51 +336,70 @@ public static function getServerAttributes(int $pterodactylId, bool $deleteOn404 //print response body - - - if ($response->failed()){ - if($deleteOn404){ //Delete the server if it does not exist (server deleted on pterodactyl) + if ($response->failed()) { + if ($deleteOn404) { //Delete the server if it does not exist (server deleted on pterodactyl) Server::where('pterodactyl_id', $pterodactylId)->first()->delete(); + return; + } else { + throw self::getException('Failed to get server attributes from pterodactyl - ', $response->status()); } - else throw self::getException("Failed to get server attributes from pterodactyl - ", $response->status()); } + return $response->json()['attributes']; } /** * Update Server Resources - * @param Server $server - * @param Product $product + * + * @param Server $server + * @param Product $product * @return Response */ public static function updateServer(Server $server, Product $product) { return self::client()->patch("/application/servers/{$server->pterodactyl_id}/build", [ - "allocation" => $server->allocation, - "memory" => $product->memory, - "swap" => $product->swap, - "disk" => $product->disk, - "io" => $product->io, - "cpu" => $product->cpu, - "threads" => null, - "feature_limits" => [ - "databases" => $product->databases, - "backups" => $product->backups, - "allocations" => $product->allocations, - ] + 'allocation' => $server->allocation, + 'memory' => $product->memory, + 'swap' => $product->swap, + 'disk' => $product->disk, + 'io' => $product->io, + 'cpu' => $product->cpu, + 'threads' => null, + 'feature_limits' => [ + 'databases' => $product->databases, + 'backups' => $product->backups, + 'allocations' => $product->allocations, + ], + ]); + } + + /** + * Update the owner of a server + * + * @param int $userId + * @param Server $server + * @return mixed + */ + public static function updateServerOwner(Server $server, int $userId) + { + return self::client()->patch("/application/servers/{$server->pterodactyl_id}/details", [ + 'name' => $server->name, + 'user' => $userId, ]); } + /** * Power Action Specific Server - * @param Server $server - * @param string $action + * + * @param Server $server + * @param string $action * @return Response */ public static function powerAction(Server $server, $action) { return self::clientAdmin()->post("/client/servers/{$server->identifier}/power", [ - "signal" => $action + 'signal' => $action, ]); } @@ -350,16 +408,16 @@ public static function powerAction(Server $server, $action) */ public static function getClientUser() { - return self::clientAdmin()->get("/client/account"); + return self::clientAdmin()->get('/client/account'); } - /** * Check if node has enough free resources to allocate the given resources - * @param Node $node - * @param int $requireMemory - * @param int $requireDisk - * @return boolean + * + * @param Node $node + * @param int $requireMemory + * @param int $requireDisk + * @return bool */ public static function checkNodeResources(Node $node, int $requireMemory, int $requireDisk) { @@ -369,14 +427,15 @@ public static function checkNodeResources(Node $node, int $requireMemory, int $r throw self::getException($e->getMessage()); } $node = $response['attributes']; - $freeMemory = ($node['memory']*($node['memory_overallocate']+100)/100) - $node['allocated_resources']['memory']; - $freeDisk = ($node['disk']*($node['disk_overallocate']+100)/100) - $node['allocated_resources']['disk']; + $freeMemory = ($node['memory'] * ($node['memory_overallocate'] + 100) / 100) - $node['allocated_resources']['memory']; + $freeDisk = ($node['disk'] * ($node['disk_overallocate'] + 100) / 100) - $node['allocated_resources']['disk']; if ($freeMemory < $requireMemory) { return false; - } - if ($freeDisk < $requireDisk) { + } + if ($freeDisk < $requireDisk) { return false; - } - return true; + } + + return true; } } diff --git a/app/Classes/Settings/Invoices.php b/app/Classes/Settings/Invoices.php index 425af60c1..72a809da9 100644 --- a/app/Classes/Settings/Invoices.php +++ b/app/Classes/Settings/Invoices.php @@ -10,9 +10,8 @@ class Invoices { public function __construct() { - return; - } + } public function updateSettings(Request $request) { @@ -22,29 +21,27 @@ public function updateSettings(Request $request) $values = [ //SETTINGS::VALUE => REQUEST-VALUE (coming from the html-form) - "SETTINGS::INVOICE:COMPANY_NAME" => "company-name", - "SETTINGS::INVOICE:COMPANY_ADDRESS" => "company-address", - "SETTINGS::INVOICE:COMPANY_PHONE" => "company-phone", - "SETTINGS::INVOICE:COMPANY_MAIL" => "company-mail", - "SETTINGS::INVOICE:COMPANY_VAT" => "company-vat", - "SETTINGS::INVOICE:COMPANY_WEBSITE" => "company-web", - "SETTINGS::INVOICE:PREFIX" => "invoice-prefix", - "SETTINGS::INVOICE:ENABLED" => "enable-invoices", + 'SETTINGS::INVOICE:COMPANY_NAME' => 'company-name', + 'SETTINGS::INVOICE:COMPANY_ADDRESS' => 'company-address', + 'SETTINGS::INVOICE:COMPANY_PHONE' => 'company-phone', + 'SETTINGS::INVOICE:COMPANY_MAIL' => 'company-mail', + 'SETTINGS::INVOICE:COMPANY_VAT' => 'company-vat', + 'SETTINGS::INVOICE:COMPANY_WEBSITE' => 'company-web', + 'SETTINGS::INVOICE:PREFIX' => 'invoice-prefix', + 'SETTINGS::INVOICE:ENABLED' => 'enable-invoices', ]; foreach ($values as $key => $value) { $param = $request->get($value); Settings::where('key', $key)->updateOrCreate(['key' => $key], ['value' => $param]); - Cache::forget("setting" . ':' . $key); + Cache::forget('setting'.':'.$key); } - if ($request->hasFile('logo')) { $request->file('logo')->storeAs('public', 'logo.png'); } - - return redirect(route('admin.settings.index') . '#invoices')->with('success', __('Invoice settings updated!')); + return redirect(route('admin.settings.index').'#invoices')->with('success', __('Invoice settings updated!')); } } diff --git a/app/Classes/Settings/Language.php b/app/Classes/Settings/Language.php index 5f9b87fe0..4e2bc3c24 100644 --- a/app/Classes/Settings/Language.php +++ b/app/Classes/Settings/Language.php @@ -8,14 +8,12 @@ use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\Validator; - class Language { public function __construct() { - return; - } + } public function updateSettings(Request $request) { @@ -28,34 +26,31 @@ public function updateSettings(Request $request) 'datatable-language' => 'required|string', ]); - if ($validator->fails()) { - return redirect(route('admin.settings.index') . '#language')->with('error', __('Language settings have not been updated!'))->withErrors($validator); + return redirect(route('admin.settings.index').'#language')->with('error', __('Language settings have not been updated!'))->withErrors($validator); } $values = [ //SETTINGS::VALUE => REQUEST-VALUE (coming from the html-form) - "SETTINGS::LOCALE:DEFAULT" => "defaultLanguage", - "SETTINGS::LOCALE:DYNAMIC" => "autotranslate", - "SETTINGS::LOCALE:CLIENTS_CAN_CHANGE" => "canClientChangeLanguage", - "SETTINGS::LOCALE:AVAILABLE" => "languages", - "SETTINGS::LOCALE:DATATABLES" => "datatable-language" + 'SETTINGS::LOCALE:DEFAULT' => 'defaultLanguage', + 'SETTINGS::LOCALE:DYNAMIC' => 'autotranslate', + 'SETTINGS::LOCALE:CLIENTS_CAN_CHANGE' => 'canClientChangeLanguage', + 'SETTINGS::LOCALE:AVAILABLE' => 'languages', + 'SETTINGS::LOCALE:DATATABLES' => 'datatable-language', ]; - foreach ($values as $key => $value) { $param = $request->get($value); if (is_array($param)) { - $param = implode(",", $param); + $param = implode(',', $param); } Settings::where('key', $key)->updateOrCreate(['key' => $key], ['value' => $param]); - Cache::forget("setting" . ':' . $key); - Session::remove("locale"); + Cache::forget('setting'.':'.$key); + Session::remove('locale'); } - - return redirect(route('admin.settings.index') . '#language')->with('success', __('Language settings updated!')); + return redirect(route('admin.settings.index').'#language')->with('success', __('Language settings updated!')); } } diff --git a/app/Classes/Settings/Misc.php b/app/Classes/Settings/Misc.php index 1b67b5622..d7563a902 100644 --- a/app/Classes/Settings/Misc.php +++ b/app/Classes/Settings/Misc.php @@ -7,12 +7,11 @@ use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Validator; - class Misc { public function __construct() { - return; + } public function updateSettings(Request $request) @@ -40,21 +39,23 @@ public function updateSettings(Request $request) 'enable_referral' => 'nullable|string', 'referral_reward' => 'nullable|numeric', 'referral_allowed' => 'nullable|string', + 'always_give_commission' => 'nullable|string', 'referral_percentage' => 'nullable|numeric', 'referral_mode' => 'nullable|string', 'ticket_enabled' => 'nullable|string', + 'ticket_notify' => 'string', ]); $validator->after(function ($validator) use ($request) { // if enable-recaptcha is true then recaptcha-site-key and recaptcha-secret-key must be set - if ($request->get('enable-recaptcha') == 'true' && (!$request->get('recaptcha-site-key') || !$request->get('recaptcha-secret-key'))) { + if ($request->get('enable-recaptcha') == 'true' && (! $request->get('recaptcha-site-key') || ! $request->get('recaptcha-secret-key'))) { $validator->errors()->add('recaptcha-site-key', 'The site key is required if recaptcha is enabled.'); $validator->errors()->add('recaptcha-secret-key', 'The secret key is required if recaptcha is enabled.'); } }); if ($validator->fails()) { - return redirect(route('admin.settings.index') . '#misc')->with('error', __('Misc settings have not been updated!'))->withErrors($validator) + return redirect(route('admin.settings.index').'#misc')->with('error', __('Misc settings have not been updated!'))->withErrors($validator) ->withInput(); } @@ -66,30 +67,31 @@ public function updateSettings(Request $request) } $values = [ - "SETTINGS::DISCORD:BOT_TOKEN" => "discord-bot-token", - "SETTINGS::DISCORD:CLIENT_ID" => "discord-client-id", - "SETTINGS::DISCORD:CLIENT_SECRET" => "discord-client-secret", - "SETTINGS::DISCORD:GUILD_ID" => "discord-guild-id", - "SETTINGS::DISCORD:INVITE_URL" => "discord-invite-url", - "SETTINGS::DISCORD:ROLE_ID" => "discord-role-id", - "SETTINGS::RECAPTCHA:SITE_KEY" => "recaptcha-site-key", - "SETTINGS::RECAPTCHA:SECRET_KEY" => "recaptcha-secret-key", - "SETTINGS::RECAPTCHA:ENABLED" => "enable-recaptcha", - "SETTINGS::MAIL:MAILER" => "mailservice", - "SETTINGS::MAIL:HOST" => "mailhost", - "SETTINGS::MAIL:PORT" => "mailport", - "SETTINGS::MAIL:USERNAME" => "mailusername", - "SETTINGS::MAIL:PASSWORD" => "mailpassword", - "SETTINGS::MAIL:ENCRYPTION" => "mailencryption", - "SETTINGS::MAIL:FROM_ADDRESS" => "mailfromadress", - "SETTINGS::MAIL:FROM_NAME" => "mailfromname", - "SETTINGS::REFERRAL::ENABLED" => "enable_referral", - "SETTINGS::REFERRAL::REWARD" => "referral_reward", - "SETTINGS::REFERRAL::ALLOWED" => "referral_allowed", - "SETTINGS::REFERRAL:MODE" => "referral_mode", - "SETTINGS::REFERRAL:PERCENTAGE" => "referral_percentage", - "SETTINGS::TICKET:ENABLED" => "ticket_enabled" - + 'SETTINGS::DISCORD:BOT_TOKEN' => 'discord-bot-token', + 'SETTINGS::DISCORD:CLIENT_ID' => 'discord-client-id', + 'SETTINGS::DISCORD:CLIENT_SECRET' => 'discord-client-secret', + 'SETTINGS::DISCORD:GUILD_ID' => 'discord-guild-id', + 'SETTINGS::DISCORD:INVITE_URL' => 'discord-invite-url', + 'SETTINGS::DISCORD:ROLE_ID' => 'discord-role-id', + 'SETTINGS::RECAPTCHA:SITE_KEY' => 'recaptcha-site-key', + 'SETTINGS::RECAPTCHA:SECRET_KEY' => 'recaptcha-secret-key', + 'SETTINGS::RECAPTCHA:ENABLED' => 'enable-recaptcha', + 'SETTINGS::MAIL:MAILER' => 'mailservice', + 'SETTINGS::MAIL:HOST' => 'mailhost', + 'SETTINGS::MAIL:PORT' => 'mailport', + 'SETTINGS::MAIL:USERNAME' => 'mailusername', + 'SETTINGS::MAIL:PASSWORD' => 'mailpassword', + 'SETTINGS::MAIL:ENCRYPTION' => 'mailencryption', + 'SETTINGS::MAIL:FROM_ADDRESS' => 'mailfromadress', + 'SETTINGS::MAIL:FROM_NAME' => 'mailfromname', + 'SETTINGS::REFERRAL::ENABLED' => 'enable_referral', + 'SETTINGS::REFERRAL::REWARD' => 'referral_reward', + 'SETTINGS::REFERRAL::ALLOWED' => 'referral_allowed', + 'SETTINGS::REFERRAL:MODE' => 'referral_mode', + 'SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION' => 'always_give_commission', + 'SETTINGS::REFERRAL:PERCENTAGE' => 'referral_percentage', + 'SETTINGS::TICKET:ENABLED' => 'ticket_enabled', + 'SETTINGS::TICKET:NOTIFY' => 'ticket_notify', ]; @@ -97,10 +99,9 @@ public function updateSettings(Request $request) $param = $request->get($value); Settings::where('key', $key)->updateOrCreate(['key' => $key], ['value' => $param]); - Cache::forget("setting" . ':' . $key); + Cache::forget('setting'.':'.$key); } - - return redirect(route('admin.settings.index') . '#misc')->with('success', __('Misc settings updated!')); + return redirect(route('admin.settings.index').'#misc')->with('success', __('Misc settings updated!')); } } diff --git a/app/Classes/Settings/Payments.php b/app/Classes/Settings/Payments.php index 262e2886e..0139abc66 100644 --- a/app/Classes/Settings/Payments.php +++ b/app/Classes/Settings/Payments.php @@ -7,55 +7,52 @@ use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Validator; - class Payments { public function __construct() { - return; - } + } public function updateSettings(Request $request) { $validator = Validator::make($request->all(), [ - "paypal-client_id" => "nullable|string", - "paypal-client-secret" => "nullable|string", - "paypal-sandbox-secret" => "nullable|string", - "stripe-secret-key" => "nullable|string", - "stripe-endpoint-secret" => "nullable|string", - "stripe-test-secret-key" => "nullable|string", - "stripe-test-endpoint-secret" => "nullable|string", - "stripe-methods" => "nullable|string", - "sales-tax" => "nullable|numeric", + 'paypal-client_id' => 'nullable|string', + 'paypal-client-secret' => 'nullable|string', + 'paypal-sandbox-secret' => 'nullable|string', + 'stripe-secret-key' => 'nullable|string', + 'stripe-endpoint-secret' => 'nullable|string', + 'stripe-test-secret-key' => 'nullable|string', + 'stripe-test-endpoint-secret' => 'nullable|string', + 'stripe-methods' => 'nullable|string', + 'sales-tax' => 'nullable|numeric', ]); if ($validator->fails()) { - return redirect(route('admin.settings.index') . '#payment')->with('error', __('Payment settings have not been updated!'))->withErrors($validator) + return redirect(route('admin.settings.index').'#payment')->with('error', __('Payment settings have not been updated!'))->withErrors($validator) ->withInput(); } $values = [ //SETTINGS::VALUE => REQUEST-VALUE (coming from the html-form) - "SETTINGS::PAYMENTS:PAYPAL:SECRET" => "paypal-client-secret", - "SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID" => "paypal-client-id", - "SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET" => "paypal-sandbox-secret", - "SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID" => "paypal-sandbox-id", - "SETTINGS::PAYMENTS:STRIPE:SECRET" => "stripe-secret", - "SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET" => "stripe-endpoint-secret", - "SETTINGS::PAYMENTS:STRIPE:TEST_SECRET" => "stripe-test-secret", - "SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET" => "stripe-endpoint-test-secret", - "SETTINGS::PAYMENTS:STRIPE:METHODS" => "stripe-methods", - "SETTINGS::PAYMENTS:SALES_TAX" => "sales-tax" + 'SETTINGS::PAYMENTS:PAYPAL:SECRET' => 'paypal-client-secret', + 'SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID' => 'paypal-client-id', + 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET' => 'paypal-sandbox-secret', + 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID' => 'paypal-sandbox-id', + 'SETTINGS::PAYMENTS:STRIPE:SECRET' => 'stripe-secret', + 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET' => 'stripe-endpoint-secret', + 'SETTINGS::PAYMENTS:STRIPE:TEST_SECRET' => 'stripe-test-secret', + 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET' => 'stripe-endpoint-test-secret', + 'SETTINGS::PAYMENTS:STRIPE:METHODS' => 'stripe-methods', + 'SETTINGS::PAYMENTS:SALES_TAX' => 'sales-tax', ]; - foreach ($values as $key => $value) { $param = $request->get($value); Settings::where('key', $key)->updateOrCreate(['key' => $key], ['value' => $param]); - Cache::forget("setting" . ':' . $key); + Cache::forget('setting'.':'.$key); } - return redirect(route('admin.settings.index') . '#payment')->with('success', __('Payment settings updated!')); + return redirect(route('admin.settings.index').'#payment')->with('success', __('Payment settings updated!')); } } diff --git a/app/Classes/Settings/System.php b/app/Classes/Settings/System.php index ed85b3b88..e278bac45 100644 --- a/app/Classes/Settings/System.php +++ b/app/Classes/Settings/System.php @@ -7,68 +7,84 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Validator; +use Qirolab\Theme\Theme; + class System { - - public function __construct() { - return; + } -public function checkPteroClientkey(){ - $response = Pterodactyl::getClientUser(); + public function checkPteroClientkey() + { + $response = Pterodactyl::getClientUser(); - if ($response->failed()){ return redirect()->back()->with('error', __('Your Key or URL is not correct')); } - return redirect()->back()->with('success', __('Everything is good!')); -} + if ($response->failed()) { + return redirect()->back()->with('error', __('Your Key or URL is not correct')); + } + + return redirect()->back()->with('success', __('Everything is good!')); + } public function updateSettings(Request $request) { $validator = Validator::make($request->all(), [ - "register-ip-check" => "string", - "server-create-charge-first-hour" => "string", - "credits-display-name" => "required|string", - "allocation-limit" => "required|min:0|integer", - "force-email-verification" => "string", - "force-discord-verification" => "string", - "initial-credits" => "required|min:0|integer", - "initial-server-limit" => "required|min:0|integer", - "credits-reward-amount-discord" => "required|min:0|integer", - "credits-reward-amount-email" => "required|min:0|integer", - "server-limit-discord" => "required|min:0|integer", - "server-limit-email" => "required|min:0|integer", - "server-limit-purchase" => "required|min:0|integer", - "pterodactyl-api-key" => "required|string", - "pterodactyl-url" => "required|string", - "per-page-limit" => "required|min:0|integer", - "pterodactyl-admin-api-key" => "required|string", - "enable-upgrades" => "string", - "enable-disable-servers" => "string", + 'register-ip-check' => 'string', + 'server-create-charge-first-hour' => 'string', + 'credits-display-name' => 'required|string', + 'allocation-limit' => 'required|min:0|integer', + 'force-email-verification' => 'string', + 'force-discord-verification' => 'string', + 'initial-credits' => 'required|min:0|integer', + 'initial-server-limit' => 'required|min:0|integer', + 'credits-reward-amount-discord' => 'required|min:0|integer', + 'credits-reward-amount-email' => 'required|min:0|integer', + 'server-limit-discord' => 'required|min:0|integer', + 'server-limit-email' => 'required|min:0|integer', + 'server-limit-purchase' => 'required|min:0|integer', + 'pterodactyl-api-key' => 'required|string', + 'pterodactyl-url' => 'required|string', + 'per-page-limit' => 'required|min:0|integer', + 'pterodactyl-admin-api-key' => 'required|string', + 'enable-upgrades' => 'string', + 'enable-disable-servers' => 'string', + 'show-imprint' => 'string', + 'show-privacy' => 'string', + 'show-tos' => 'string', + 'alert-enabled' => 'string', + 'alter-type' => 'string', + 'alert-message' => 'string|nullable', + 'motd-enabled' => 'string', + 'usefullinks-enabled' => 'string', + 'motd-message' => 'string|nullable', + 'seo-title' => 'string|nullable', + 'seo-description' => 'string|nullable', ]); $validator->after(function ($validator) use ($request) { // if enable-recaptcha is true then recaptcha-site-key and recaptcha-secret-key must be set - if ($request->get('enable-upgrades') == 'true' && (!$request->get('pterodactyl-admin-api-key'))) { + if ($request->get('enable-upgrades') == 'true' && (! $request->get('pterodactyl-admin-api-key'))) { $validator->errors()->add('pterodactyl-admin-api-key', 'The admin api key is required when upgrades are enabled.'); } }); if ($validator->fails()) { - return redirect(route('admin.settings.index') . '#system')->with('error', __('System settings have not been updated!'))->withErrors($validator) + return redirect(route('admin.settings.index').'#system')->with('error', __('System settings have not been updated!'))->withErrors($validator) ->withInput(); } // update Icons from request $this->updateIcons($request); - $values = [ + "SETTINGS::SYSTEM:REGISTER_IP_CHECK" => "register-ip-check", "SETTINGS::SYSTEM:SERVER_CREATE_CHARGE_FIRST_HOUR" => "server-create-charge-first-hour", "SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME" => "credits-display-name", "SETTINGS::SERVER:ALLOCATION_LIMIT" => "allocation-limit", + "SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER" => "minimum-credits", "SETTINGS::USER:FORCE_DISCORD_VERIFICATION" => "force-discord-verification", "SETTINGS::USER:FORCE_EMAIL_VERIFICATION" => "force-email-verification", "SETTINGS::USER:INITIAL_CREDITS" => "initial-credits", @@ -87,18 +103,34 @@ public function updateSettings(Request $request) "SETTINGS::SYSTEM:ENABLE_UPGRADE" => "enable-upgrade", "SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS" => "enable-disable-servers", "SETTINGS::SYSTEM:CREATION_OF_NEW_USERS" => "enable-disable-new-users", + "SETTINGS::SYSTEM:SHOW_IMPRINT" => "show-imprint", + "SETTINGS::SYSTEM:SHOW_PRIVACY" => "show-privacy", + "SETTINGS::SYSTEM:SHOW_TOS" => "show-tos", + "SETTINGS::SYSTEM:ALERT_ENABLED" => "alert-enabled", + "SETTINGS::SYSTEM:ALERT_TYPE" => "alert-type", + "SETTINGS::SYSTEM:ALERT_MESSAGE" => "alert-message", + "SETTINGS::SYSTEM:THEME" => "theme", + "SETTINGS::SYSTEM:MOTD_ENABLED" => "motd-enabled", + "SETTINGS::SYSTEM:MOTD_MESSAGE" => "motd-message", + "SETTINGS::SYSTEM:USEFULLINKS_ENABLED" => "usefullinks-enabled", + "SETTINGS::SYSTEM:SEO_TITLE" => "seo-title", + "SETTINGS::SYSTEM:SEO_DESCRIPTION" => "seo-description", ]; - foreach ($values as $key => $value) { $param = $request->get($value); Settings::where('key', $key)->updateOrCreate(['key' => $key], ['value' => $param]); - Cache::forget("setting" . ':' . $key); + Cache::forget('setting'.':'.$key); } - return redirect(route('admin.settings.index') . '#system')->with('success', __('System settings updated!')); - } + //SET THEME + $theme = $request->get('theme'); + Theme::set($theme); + + + return redirect(route('admin.settings.index').'#system')->with('success', __('System settings updated!')); + } private function updateIcons(Request $request) { diff --git a/app/Console/Commands/ChargeCreditsCommand.php b/app/Console/Commands/ChargeCreditsCommand.php index 35bfad0a4..e51bfdf99 100644 --- a/app/Console/Commands/ChargeCreditsCommand.php +++ b/app/Console/Commands/ChargeCreditsCommand.php @@ -24,9 +24,9 @@ class ChargeCreditsCommand extends Command */ protected $description = 'Charge all users with active servers'; - /** * A list of users that have to be notified + * * @var array */ protected $usersToNotify = []; @@ -56,24 +56,23 @@ public function handle() /** @var User $user */ $user = $server->user; - #charge credits / suspend server + //charge credits / suspend server if ($user->credits >= $product->getHourlyPrice()) { $this->line("{$user->name} Current credits: {$user->credits} Credits to be removed: {$product->getHourlyPrice()}"); $user->decrement('credits', $product->getHourlyPrice()); } else { try { - #suspend server + //suspend server $this->line("{$server->name} from user: {$user->name} has been suspended!"); $server->suspend(); - #add user to notify list - if (!in_array($user, $this->usersToNotify)) { + //add user to notify list + if (! in_array($user, $this->usersToNotify)) { array_push($this->usersToNotify, $user); } } catch (\Exception $exception) { $this->error($exception->getMessage()); } - } } }); @@ -86,7 +85,7 @@ public function handle() */ public function notifyUsers() { - if (!empty($this->usersToNotify)) { + if (! empty($this->usersToNotify)) { /** @var User $user */ foreach ($this->usersToNotify as $user) { $this->line("Notified user: {$user->name}"); @@ -94,8 +93,9 @@ public function notifyUsers() } } - #reset array - $this->usersToNotify = array(); + //reset array + $this->usersToNotify = []; + return true; } } diff --git a/app/Console/Commands/GetGithubVersion.php b/app/Console/Commands/GetGithubVersion.php new file mode 100644 index 000000000..31e936252 --- /dev/null +++ b/app/Console/Commands/GetGithubVersion.php @@ -0,0 +1,43 @@ +json()[0]['name']; + Storage::disk('local')->put('latestVersion', $latestVersion); + } catch (Exception $e) { + Storage::disk('local')->put('latestVersion', "unknown"); + Log::error($e); + } + return Command::SUCCESS; + } +} diff --git a/app/Console/Commands/ImportUsersFromPteroCommand.php b/app/Console/Commands/ImportUsersFromPteroCommand.php index f3021dd16..8893693ba 100644 --- a/app/Console/Commands/ImportUsersFromPteroCommand.php +++ b/app/Console/Commands/ImportUsersFromPteroCommand.php @@ -12,6 +12,7 @@ class ImportUsersFromPteroCommand extends Command * @var string */ private $importFileName = 'users.json'; + /** * The name and signature of the console command. * @@ -39,25 +40,28 @@ public function __construct() /** * Execute the console command. * - * @return boolean + * @return bool */ public function handle() { //check if json file exists - if (!Storage::disk('local')->exists('users.json')) { - $this->error('[ERROR] ' . storage_path('app') . '/' . $this->importFileName . ' is missing'); + if (! Storage::disk('local')->exists('users.json')) { + $this->error('[ERROR] '.storage_path('app').'/'.$this->importFileName.' is missing'); + return false; } //check if json file is valid $json = json_decode(Storage::disk('local')->get('users.json')); - if (!array_key_exists(2, $json)) { + if (! array_key_exists(2, $json)) { $this->error('[ERROR] Invalid json file'); + return false; } - if (!$json[2]->data) { + if (! $json[2]->data) { $this->error('[ERROR] Invalid json file / No users found!'); + return false; } @@ -69,12 +73,14 @@ public function handle() //cancel if ($confirm !== 'y') { $this->error('[ERROR] Stopped import script!'); + return false; } //import users $this->deleteCurrentUserBase(); $this->importUsingJsonFile($json, $initial_credits, $initial_server_limit); + return true; } @@ -84,7 +90,9 @@ public function handle() private function deleteCurrentUserBase() { $currentUserCount = User::count(); - if ($currentUserCount == 0) return; + if ($currentUserCount == 0) { + return; + } $this->line("Deleting ({$currentUserCount}) users.."); foreach (User::all() as $user) { @@ -104,20 +112,20 @@ private function importUsingJsonFile($json, $initial_credits, $initial_server_li $role = $user->root_admin == '0' ? 'member' : 'admin'; User::create([ - "pterodactyl_id" => $user->id, - "name" => $user->name_first, - "email" => $user->email, - "password" => $user->password, - "role" => $role, - "credits" => $initial_credits, - "server_limit" => $initial_server_limit, - "created_at" => $user->created_at, - "updated_at" => $user->updated_at, + 'pterodactyl_id' => $user->id, + 'name' => $user->name_first, + 'email' => $user->email, + 'password' => $user->password, + 'role' => $role, + 'credits' => $initial_credits, + 'server_limit' => $initial_server_limit, + 'created_at' => $user->created_at, + 'updated_at' => $user->updated_at, ]); }); $this->newLine(); - $this->line("Done importing, you can now login using your pterodactyl credentials."); + $this->line('Done importing, you can now login using your pterodactyl credentials.'); $this->newLine(); } } diff --git a/app/Console/Commands/MakeUserCommand.php b/app/Console/Commands/MakeUserCommand.php index a06f0d184..0564b3dd9 100644 --- a/app/Console/Commands/MakeUserCommand.php +++ b/app/Console/Commands/MakeUserCommand.php @@ -7,7 +7,6 @@ use Illuminate\Console\Command; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; -use Illuminate\Validation\ValidationException; class MakeUserCommand extends Command { @@ -59,6 +58,7 @@ public function handle() if ($validator->fails()) { $this->error($validator->errors()->first()); + return 0; } @@ -66,9 +66,16 @@ public function handle() $response = $this->pterodactyl->getUser($ptero_id); if (isset($response['errors'])) { - if (isset($response['errors'][0]['code'])) $this->error("code: {$response['errors'][0]['code']}"); - if (isset($response['errors'][0]['status'])) $this->error("status: {$response['errors'][0]['status']}"); - if (isset($response['errors'][0]['detail'])) $this->error("detail: {$response['errors'][0]['detail']}"); + if (isset($response['errors'][0]['code'])) { + $this->error("code: {$response['errors'][0]['code']}"); + } + if (isset($response['errors'][0]['status'])) { + $this->error("status: {$response['errors'][0]['status']}"); + } + if (isset($response['errors'][0]['detail'])) { + $this->error("detail: {$response['errors'][0]['detail']}"); + } + return 0; } @@ -77,7 +84,7 @@ public function handle() 'email' => $response['email'], 'role' => 'admin', 'password' => Hash::make($password), - 'pterodactyl_id' => $response['id'] + 'pterodactyl_id' => $response['id'], ]); $this->table(['Field', 'Value'], [ diff --git a/app/Console/Commands/notify.php b/app/Console/Commands/notify.php index ffc2ec01b..8b2c6ca1e 100644 --- a/app/Console/Commands/notify.php +++ b/app/Console/Commands/notify.php @@ -36,12 +36,13 @@ public function __construct() /** * Execute the console command. * - * @param int $id + * @param int $id * @return int */ public function handle() { User::findOrFail($this->argument('id'))->notify(new ServerCreationError(Server::all()[0])); + return 'message send'; } } diff --git a/app/Console/Commands/update.php b/app/Console/Commands/update.php index 2ed305bc7..deb12c863 100644 --- a/app/Console/Commands/update.php +++ b/app/Console/Commands/update.php @@ -2,10 +2,10 @@ namespace App\Console\Commands; -use Illuminate\Console\Command; use Closure; -use Symfony\Component\Process\Process; +use Illuminate\Console\Command; use Symfony\Component\Console\Helper\ProgressBar; +use Symfony\Component\Process\Process; class update extends Command { @@ -45,7 +45,7 @@ public function handle() $this->output->warning('This command does just pull the newest changes from the github repo. Verify the github repo before running this'); if (version_compare(PHP_VERSION, '8.0.0') < 0) { - $this->error('Cannot execute self-upgrade process. The minimum required PHP version required is 8.0.0, you have [' . PHP_VERSION . '].'); + $this->error('Cannot execute self-upgrade process. The minimum required PHP version required is 8.0.0, you have ['.PHP_VERSION.'].'); } $user = 'www-data'; @@ -55,7 +55,7 @@ public function handle() $userDetails = posix_getpwuid(fileowner('public')); $user = $userDetails['name'] ?? 'www-data'; - if (!$this->confirm("Your webserver user has been detected as [{$user}]: is this correct?", true)) { + if (! $this->confirm("Your webserver user has been detected as [{$user}]: is this correct?", true)) { $user = $this->anticipate( 'Please enter the name of the user running your webserver process. This varies from system to system, but is generally "www-data", "nginx", or "apache".', [ @@ -71,7 +71,7 @@ public function handle() $groupDetails = posix_getgrgid(filegroup('public')); $group = $groupDetails['name'] ?? 'www-data'; - if (!$this->confirm("Your webserver group has been detected as [{$group}]: is this correct?", true)) { + if (! $this->confirm("Your webserver group has been detected as [{$group}]: is this correct?", true)) { $group = $this->anticipate( 'Please enter the name of the group running your webserver process. Normally this is the same as your user.', [ @@ -85,24 +85,21 @@ public function handle() ini_set('output_buffering', 0); - if (!$this->confirm('Are you sure you want to run the upgrade process for your Dashboard?')) { + if (! $this->confirm('Are you sure you want to run the upgrade process for your Dashboard?')) { return false; } - $bar = $this->output->createProgressBar(9); $bar->start(); - $this->withProgress($bar, function () { - $this->line("\$upgrader> git pull"); - $process = Process::fromShellCommandline("git pull"); + $this->line('$upgrader> git pull'); + $process = Process::fromShellCommandline('git pull'); $process->run(function ($type, $buffer) { $this->{$type === Process::ERR ? 'error' : 'line'}($buffer); }); }); - $this->withProgress($bar, function () { $this->line('$upgrader> php artisan down'); $this->call('down'); @@ -118,12 +115,12 @@ public function handle() $this->withProgress($bar, function () { $command = ['composer', 'install', '--no-ansi']; - if (config('app.env') === 'production' && !config('app.debug')) { + if (config('app.env') === 'production' && ! config('app.debug')) { $command[] = '--optimize-autoloader'; $command[] = '--no-dev'; } - $this->line('$upgrader> ' . implode(' ', $command)); + $this->line('$upgrader> '.implode(' ', $command)); $process = new Process($command); $process->setTimeout(10 * 60); $process->run(function ($type, $buffer) { @@ -162,10 +159,9 @@ public function handle() $this->newLine(); $this->info('Finished running upgrade.'); - }; + } } - protected function withProgress(ProgressBar $bar, Closure $callback) { $bar->clear(); diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index fe25d44cc..5f0812116 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -8,28 +8,20 @@ class Kernel extends ConsoleKernel { - /** - * The Artisan commands provided by your application. - * - * @var array - */ - protected $commands = [ - // - ]; - /** * Define the application's command schedule. * - * @param \Illuminate\Console\Scheduling\Schedule $schedule + * @param \Illuminate\Console\Scheduling\Schedule $schedule * @return void */ protected function schedule(Schedule $schedule) { $schedule->command('credits:charge')->hourly(); + $schedule->command('cp:versioncheck:get')->daily(); //log cronjob activity $schedule->call(function () { - Storage::disk('logs')->put('cron.log' , "Last activity from cronjobs - " . now()); + Storage::disk('logs')->put('cron.log', 'Last activity from cronjobs - '.now()); })->everyMinute(); } @@ -40,7 +32,7 @@ protected function schedule(Schedule $schedule) */ protected function commands() { - $this->load(__DIR__ . '/Commands'); + $this->load(__DIR__.'/Commands'); require base_path('routes/console.php'); } diff --git a/app/Events/PaymentEvent.php b/app/Events/PaymentEvent.php new file mode 100644 index 000000000..117112001 --- /dev/null +++ b/app/Events/PaymentEvent.php @@ -0,0 +1,31 @@ +user = $user; + $this->payment = $payment; + $this->shopProduct = $shopProduct; + } +} diff --git a/app/Events/UserUpdateCreditsEvent.php b/app/Events/UserUpdateCreditsEvent.php index 7194bd8a6..7548de60d 100644 --- a/app/Events/UserUpdateCreditsEvent.php +++ b/app/Events/UserUpdateCreditsEvent.php @@ -3,11 +3,7 @@ namespace App\Events; use App\Models\User; -use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Broadcasting\PresenceChannel; -use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; @@ -23,7 +19,7 @@ class UserUpdateCreditsEvent /** * Create a new event instance. * - * @param User $user + * @param User $user */ public function __construct(User $user) { diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index f9644addc..82a37e400 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -7,21 +7,31 @@ class Handler extends ExceptionHandler { + /** + * A list of exception types with their corresponding custom log levels. + * + * @var array, \Psr\Log\LogLevel::*> + */ + protected $levels = [ + // + ]; + /** * A list of the exception types that are not reported. * - * @var array + * @var array> */ protected $dontReport = [ // ]; /** - * A list of the inputs that are never flashed for validation exceptions. + * A list of the inputs that are never flashed to the session on validation exceptions. * - * @var array + * @var array */ protected $dontFlash = [ + 'current_password', 'password', 'password_confirmation', ]; diff --git a/app/Extensions/PaymentGateways/PayPal/config.php b/app/Extensions/PaymentGateways/PayPal/config.php new file mode 100644 index 000000000..a8b6779dd --- /dev/null +++ b/app/Extensions/PaymentGateways/PayPal/config.php @@ -0,0 +1,12 @@ + "PayPal", + "description" => "PayPal payment gateway", + "RoutesIgnoreCsrf" => [], + ]; +} diff --git a/app/Extensions/PaymentGateways/PayPal/index.php b/app/Extensions/PaymentGateways/PayPal/index.php new file mode 100644 index 000000000..88abc8091 --- /dev/null +++ b/app/Extensions/PaymentGateways/PayPal/index.php @@ -0,0 +1,176 @@ +shopProduct); + $discount = PartnerDiscount::getDiscount(); + + // create a new payment + $payment = Payment::create([ + 'user_id' => $user->id, + 'payment_id' => null, + 'payment_method' => 'paypal', + 'type' => $shopProduct->type, + 'status' => 'open', + 'amount' => $shopProduct->quantity, + 'price' => $shopProduct->price - ($shopProduct->price * $discount / 100), + 'tax_value' => $shopProduct->getTaxValue(), + 'tax_percent' => $shopProduct->getTaxPercent(), + 'total_price' => $shopProduct->getTotalPrice(), + 'currency_code' => $shopProduct->currency_code, + 'shop_item_product_id' => $shopProduct->id, + ]); + + $request = new OrdersCreateRequest(); + $request->prefer('return=representation'); + $request->body = [ + "intent" => "CAPTURE", + "purchase_units" => [ + [ + "reference_id" => uniqid(), + "description" => $shopProduct->display . ($discount ? (" (" . __('Discount') . " " . $discount . '%)') : ""), + "amount" => [ + "value" => $shopProduct->getTotalPrice(), + 'currency_code' => strtoupper($shopProduct->currency_code), + 'breakdown' => [ + 'item_total' => + [ + 'currency_code' => strtoupper($shopProduct->currency_code), + 'value' => $shopProduct->getPriceAfterDiscount(), + ], + 'tax_total' => + [ + 'currency_code' => strtoupper($shopProduct->currency_code), + 'value' => $shopProduct->getTaxValue(), + ] + ] + ] + ] + ], + "application_context" => [ + "cancel_url" => route('payment.Cancel'), + "return_url" => route('payment.PayPalSuccess', ['payment' => $payment->id]), + 'brand_name' => config('app.name', 'Laravel'), + 'shipping_preference' => 'NO_SHIPPING' + ] + + + ]; + + try { + // Call API with your client and get a response for your call + $response = getPayPalClient()->execute($request); + + Redirect::away($response->result->links[1]->href)->send(); + return; + } catch (HttpException $ex) { + error_log($ex->statusCode); + error_log($ex->getMessage()); + + $payment->delete(); + Redirect::route('payment.Cancel'); + return; + } +} +/** + * @param Request $laravelRequest + */ +function PaypalSuccess(Request $laravelRequest) +{ + $user = Auth::user(); + $user = User::findOrFail($user->id); + + $payment = Payment::findOrFail($laravelRequest->payment); + $shopProduct = ShopProduct::findOrFail($payment->shop_item_product_id); + + $request = new OrdersCaptureRequest($laravelRequest->input('token')); + $request->prefer('return=representation'); + + try { + // Call API with your client and get a response for your call + $response = getPayPalClient()->execute($request); + if ($response->statusCode == 201 || $response->statusCode == 200) { + //update payment + $payment->update([ + 'status' => 'paid', + 'payment_id' => $response->result->id, + ]); + + event(new UserUpdateCreditsEvent($user)); + event(new PaymentEvent($user, $payment, $shopProduct)); + + // redirect to the payment success page with success message + Redirect::route('home')->with('success', 'Payment successful')->send(); + } elseif (env('APP_ENV') == 'local') { + // If call returns body in response, you can get the deserialized version from the result attribute of the response + $payment->delete(); + dd($response); + } else { + $payment->update([ + 'status' => 'cancelled', + 'payment_id' => $response->result->id, + ]); + abort(500); + } + } catch (HttpException $ex) { + if (env('APP_ENV') == 'local') { + echo $ex->statusCode; + $payment->delete(); + dd($ex->getMessage()); + } else { + $payment->update([ + 'status' => 'cancelled', + 'payment_id' => $response->result->id, + ]); + abort(422); + } + } +} +/** + * @return PayPalHttpClient + */ +function getPayPalClient() +{ + $environment = env('APP_ENV') == 'local' + ? new SandboxEnvironment(getPaypalClientId(), getPaypalClientSecret()) + : new ProductionEnvironment(getPaypalClientId(), getPaypalClientSecret()); + return new PayPalHttpClient($environment); +} +/** + * @return string + */ +function getPaypalClientId() +{ + return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID") : config("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID"); +} +/** + * @return string + */ +function getPaypalClientSecret() +{ + return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") : config("SETTINGS::PAYMENTS:PAYPAL:SECRET"); +} diff --git a/app/Extensions/PaymentGateways/PayPal/web_routes.php b/app/Extensions/PaymentGateways/PayPal/web_routes.php new file mode 100644 index 000000000..56497768e --- /dev/null +++ b/app/Extensions/PaymentGateways/PayPal/web_routes.php @@ -0,0 +1,18 @@ +group(function () { + Route::get('payment/PayPalPay/{shopProduct}', function () { + PaypalPay(request()); + })->name('payment.PayPalPay'); + + Route::get( + 'payment/PayPalSuccess', + function () { + PaypalSuccess(request()); + } + )->name('payment.PayPalSuccess'); +}); diff --git a/app/Extensions/PaymentGateways/Stripe/config.php b/app/Extensions/PaymentGateways/Stripe/config.php new file mode 100644 index 000000000..f4843a3e2 --- /dev/null +++ b/app/Extensions/PaymentGateways/Stripe/config.php @@ -0,0 +1,14 @@ + "Stripe", + "description" => "Stripe payment gateway", + "RoutesIgnoreCsrf" => [ + "payment/StripeWebhooks", + ], + ]; +} diff --git a/app/Extensions/PaymentGateways/Stripe/index.php b/app/Extensions/PaymentGateways/Stripe/index.php new file mode 100644 index 000000000..56e898c2e --- /dev/null +++ b/app/Extensions/PaymentGateways/Stripe/index.php @@ -0,0 +1,373 @@ +shopProduct); + + // check if the price is valid for stripe + if (!checkPriceAmount($shopProduct->getTotalPrice(), strtoupper($shopProduct->currency_code), 'stripe')) { + Redirect::route('home')->with('error', __('The product you chose can\'t be purchased with this payment method. The total amount is too small. Please buy a bigger amount or try a different payment method.'))->send(); + return; + } + + $discount = PartnerDiscount::getDiscount(); + + + // create payment + $payment = Payment::create([ + 'user_id' => $user->id, + 'payment_id' => null, + 'payment_method' => 'stripe', + 'type' => $shopProduct->type, + 'status' => 'open', + 'amount' => $shopProduct->quantity, + 'price' => $shopProduct->price - ($shopProduct->price * $discount / 100), + 'tax_value' => $shopProduct->getTaxValue(), + 'total_price' => $shopProduct->getTotalPrice(), + 'tax_percent' => $shopProduct->getTaxPercent(), + 'currency_code' => $shopProduct->currency_code, + 'shop_item_product_id' => $shopProduct->id, + ]); + + $stripeClient = getStripeClient(); + $request = $stripeClient->checkout->sessions->create([ + 'line_items' => [ + [ + 'price_data' => [ + 'currency' => $shopProduct->currency_code, + 'product_data' => [ + 'name' => $shopProduct->display . ($discount ? (' (' . __('Discount') . ' ' . $discount . '%)') : ''), + 'description' => $shopProduct->description, + ], + 'unit_amount_decimal' => round($shopProduct->getPriceAfterDiscount() * 100, 2), + ], + 'quantity' => 1, + ], + [ + 'price_data' => [ + 'currency' => $shopProduct->currency_code, + 'product_data' => [ + 'name' => __('Tax'), + 'description' => $shopProduct->getTaxPercent() . '%', + ], + 'unit_amount_decimal' => round($shopProduct->getTaxValue(), 2) * 100, + ], + 'quantity' => 1, + ], + ], + + 'mode' => 'payment', + 'payment_method_types' => str_getcsv(config('SETTINGS::PAYMENTS:STRIPE:METHODS')), + 'success_url' => route('payment.StripeSuccess', ['payment' => $payment->id]) . '&session_id={CHECKOUT_SESSION_ID}', + 'cancel_url' => route('payment.Cancel'), + 'payment_intent_data' => [ + 'metadata' => [ + 'payment_id' => $payment->id, + ], + ], + ]); + + Redirect::to($request->url)->send(); +} + +/** + * @param Request $request + */ +function StripeSuccess(Request $request) +{ + $user = Auth::user(); + $user = User::findOrFail($user->id); + $payment = Payment::findOrFail($request->input('payment')); + $shopProduct = ShopProduct::findOrFail($payment->shop_item_product_id); + + + Redirect::route('home')->with('success', 'Please wait for success')->send(); + + $stripeClient = getStripeClient(); + try { + //get stripe data + $paymentSession = $stripeClient->checkout->sessions->retrieve($request->input('session_id')); + $paymentIntent = $stripeClient->paymentIntents->retrieve($paymentSession->payment_intent); + + //get DB entry of this payment ID if existing + $paymentDbEntry = Payment::where('payment_id', $paymentSession->payment_intent)->count(); + + // check if payment is 100% completed and payment does not exist in db already + if ($paymentSession->status == 'complete' && $paymentIntent->status == 'succeeded' && $paymentDbEntry == 0) { + + //update payment + $payment->update([ + 'payment_id' => $paymentSession->payment_intent, + 'status' => 'paid', + ]); + + //payment notification + $user->notify(new ConfirmPaymentNotification($payment)); + + event(new UserUpdateCreditsEvent($user)); + event(new PaymentEvent($user, $payment, $shopProduct)); + + //redirect back to home + Redirect::route('home')->with('success', 'Payment successful')->send(); + } else { + if ($paymentIntent->status == 'processing') { + + //update payment + $payment->update([ + 'payment_id' => $paymentSession->payment_intent, + 'status' => 'processing', + ]); + + event(new PaymentEvent($user, $payment, $shopProduct)); + + Redirect::route('home')->with('success', 'Your payment is being processed')->send(); + } + + if ($paymentDbEntry == 0 && $paymentIntent->status != 'processing') { + $stripeClient->paymentIntents->cancel($paymentIntent->id); + + //redirect back to home + Redirect::route('home')->with('info', __('Your payment has been canceled!'))->send(); + } else { + abort(402); + } + } + } catch (Exception $e) { + if (env('APP_ENV') == 'local') { + dd($e->getMessage()); + } else { + abort(422); + } + } +} + +/** + * @param Request $request + */ +function handleStripePaymentSuccessHook($paymentIntent) +{ + try { + $payment = Payment::where('id', $paymentIntent->metadata->payment_id)->with('user')->first(); + $user = User::where('id', $payment->user_id)->first(); + $shopProduct = ShopProduct::findOrFail($payment->shop_item_product_id); + + if ($paymentIntent->status == 'succeeded' && $payment->status == 'processing') { + + //update payment db entry status + $payment->update([ + 'payment_id' => $payment->payment_id ?? $paymentIntent->id, + 'status' => 'paid' + ]); + + //payment notification + $user->notify(new ConfirmPaymentNotification($payment)); + event(new UserUpdateCreditsEvent($user)); + event(new PaymentEvent($user, $payment, $shopProduct)); + } + + // return 200 + return response()->json(['success' => true], 200); + } catch (Exception $ex) { + abort(422); + } +} + +/** + * @param Request $request + */ +function StripeWebhooks(Request $request) +{ + Stripe::setApiKey(getStripeSecret()); + + try { + $payload = @file_get_contents('php://input'); + $sig_header = $request->header('Stripe-Signature'); + $event = null; + $event = \Stripe\Webhook::constructEvent( + $payload, + $sig_header, + getStripeEndpointSecret() + ); + } catch (\UnexpectedValueException $e) { + // Invalid payload + + abort(400); + } catch (SignatureVerificationException $e) { + // Invalid signature + + abort(400); + } + + // Handle the event + switch ($event->type) { + case 'payment_intent.succeeded': + $paymentIntent = $event->data->object; // contains a \Stripe\PaymentIntent + handleStripePaymentSuccessHook($paymentIntent); + break; + default: + echo 'Received unknown event type ' . $event->type; + } +} + +/** + * @return \Stripe\StripeClient + */ +function getStripeClient() +{ + return new StripeClient(getStripeSecret()); +} + +/** + * @return string + */ +function getStripeSecret() +{ + return env('APP_ENV') == 'local' + ? config('SETTINGS::PAYMENTS:STRIPE:TEST_SECRET') + : config('SETTINGS::PAYMENTS:STRIPE:SECRET'); +} + +/** + * @return string + */ +function getStripeEndpointSecret() +{ + return env('APP_ENV') == 'local' + ? config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET') + : config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET'); +} +/** + * @param $amount + * @param $currencyCode + * @param $payment_method + * @return bool + * @description check if the amount is higher than the minimum amount for the stripe gateway + */ +function checkPriceAmount($amount, $currencyCode, $payment_method) +{ + $minimums = [ + "USD" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "AED" => [ + "paypal" => 0, + "stripe" => 2 + ], + "AUD" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "BGN" => [ + "paypal" => 0, + "stripe" => 1 + ], + "BRL" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "CAD" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "CHF" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "CZK" => [ + "paypal" => 0, + "stripe" => 15 + ], + "DKK" => [ + "paypal" => 0, + "stripe" => 2.5 + ], + "EUR" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "GBP" => [ + "paypal" => 0, + "stripe" => 0.3 + ], + "HKD" => [ + "paypal" => 0, + "stripe" => 4 + ], + "HRK" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "HUF" => [ + "paypal" => 0, + "stripe" => 175 + ], + "INR" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "JPY" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "MXN" => [ + "paypal" => 0, + "stripe" => 10 + ], + "MYR" => [ + "paypal" => 0, + "stripe" => 2 + ], + "NOK" => [ + "paypal" => 0, + "stripe" => 3 + ], + "NZD" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "PLN" => [ + "paypal" => 0, + "stripe" => 2 + ], + "RON" => [ + "paypal" => 0, + "stripe" => 2 + ], + "SEK" => [ + "paypal" => 0, + "stripe" => 3 + ], + "SGD" => [ + "paypal" => 0, + "stripe" => 0.5 + ], + "THB" => [ + "paypal" => 0, + "stripe" => 10 + ] + ]; + return $amount >= $minimums[$currencyCode][$payment_method]; +} diff --git a/app/Extensions/PaymentGateways/Stripe/web_routes.php b/app/Extensions/PaymentGateways/Stripe/web_routes.php new file mode 100644 index 000000000..adf481da0 --- /dev/null +++ b/app/Extensions/PaymentGateways/Stripe/web_routes.php @@ -0,0 +1,23 @@ +group(function () { + Route::get('payment/StripePay/{shopProduct}', function () { + StripePay(request()); + })->name('payment.StripePay'); + + Route::get( + 'payment/StripeSuccess', + function () { + StripeSuccess(request()); + } + )->name('payment.StripeSuccess'); +}); + + +// Stripe WebhookRoute -> validation in Route Handler +Route::post('payment/StripeWebhooks', function () { + StripeWebhooks(request()); +})->name('payment.StripeWebhooks'); diff --git a/app/Helpers/ExtensionHelper.php b/app/Helpers/ExtensionHelper.php new file mode 100644 index 000000000..fdf880ab8 --- /dev/null +++ b/app/Helpers/ExtensionHelper.php @@ -0,0 +1,84 @@ + $route) { + $routes[$key] = 'extensions/' . $route; + } + } + + return $routes; + } + + /** + * Get all extensions + * @return array + */ + public static function getAllExtensions() + { + $extensionNamespaces = glob(app_path() . '/Extensions/*', GLOB_ONLYDIR); + $extensions = []; + foreach ($extensionNamespaces as $extensionNamespace) { + $extensions = array_merge($extensions, glob($extensionNamespace . '/*', GLOB_ONLYDIR)); + } + + return $extensions; + } + + public static function getAllExtensionsByNamespace(string $namespace) + { + $extensions = glob(app_path() . '/Extensions/' . $namespace . '/*', GLOB_ONLYDIR); + + return $extensions; + } +} diff --git a/app/Http/Controllers/Admin/ActivityLogController.php b/app/Http/Controllers/Admin/ActivityLogController.php index 305639bcb..2b0610948 100644 --- a/app/Http/Controllers/Admin/ActivityLogController.php +++ b/app/Http/Controllers/Admin/ActivityLogController.php @@ -24,17 +24,16 @@ public function index(Request $request) $cronLogs = Storage::disk('logs')->exists('cron.log') ? Storage::disk('logs')->get('cron.log') : null; if ($request->input('search')) { - $query = Activity::whereHasMorph('causer' , [User::class] , function($query) use ($request) { - $query->where('name', 'like' , "%{$request->input('search')}%"); - })->orderBy('created_at' , 'desc')->paginate(20); + $query = Activity::whereHasMorph('causer', [User::class], function ($query) use ($request) { + $query->where('name', 'like', "%{$request->input('search')}%"); + })->orderBy('created_at', 'desc')->paginate(20); } else { - $query = Activity::orderBy('created_at' , 'desc')->paginate(20); + $query = Activity::orderBy('created_at', 'desc')->paginate(20); } - return view('admin.activitylogs.index')->with([ 'logs' => $query, - 'cronlogs' => $cronLogs + 'cronlogs' => $cronLogs, ]); } @@ -51,7 +50,7 @@ public function create() /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return Response */ public function store(Request $request) @@ -84,7 +83,7 @@ public function edit($id) /** * Update the specified resource in storage. * - * @param Request $request + * @param Request $request * @param int $id * @return Response */ diff --git a/app/Http/Controllers/Admin/ApplicationApiController.php b/app/Http/Controllers/Admin/ApplicationApiController.php index 52827a60d..b71689392 100644 --- a/app/Http/Controllers/Admin/ApplicationApiController.php +++ b/app/Http/Controllers/Admin/ApplicationApiController.php @@ -12,7 +12,6 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Http\Response; -use Illuminate\Support\Str; class ApplicationApiController extends Controller { @@ -39,17 +38,17 @@ public function create() /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return RedirectResponse */ public function store(Request $request) { $request->validate([ - 'memo' => 'nullable|string|max:60' + 'memo' => 'nullable|string|max:60', ]); ApplicationApi::create([ - 'memo' => $request->input('memo') + 'memo' => $request->input('memo'), ]); return redirect()->route('admin.api.index')->with('success', __('api key created!')); @@ -58,7 +57,7 @@ public function store(Request $request) /** * Display the specified resource. * - * @param ApplicationApi $applicationApi + * @param ApplicationApi $applicationApi * @return Response */ public function show(ApplicationApi $applicationApi) @@ -69,27 +68,27 @@ public function show(ApplicationApi $applicationApi) /** * Show the form for editing the specified resource. * - * @param ApplicationApi $applicationApi + * @param ApplicationApi $applicationApi * @return Application|Factory|View|Response */ public function edit(ApplicationApi $applicationApi) { - return view('admin.api.edit' , [ - 'applicationApi' => $applicationApi + return view('admin.api.edit', [ + 'applicationApi' => $applicationApi, ]); } /** * Update the specified resource in storage. * - * @param Request $request - * @param ApplicationApi $applicationApi + * @param Request $request + * @param ApplicationApi $applicationApi * @return RedirectResponse */ public function update(Request $request, ApplicationApi $applicationApi) { $request->validate([ - 'memo' => 'nullable|string|max:60' + 'memo' => 'nullable|string|max:60', ]); $applicationApi->update($request->all()); @@ -100,18 +99,20 @@ public function update(Request $request, ApplicationApi $applicationApi) /** * Remove the specified resource from storage. * - * @param ApplicationApi $applicationApi + * @param ApplicationApi $applicationApi * @return RedirectResponse */ public function destroy(ApplicationApi $applicationApi) { $applicationApi->delete(); + return redirect()->back()->with('success', __('api key has been removed!')); } /** - * @param Request $request + * @param Request $request * @return JsonResponse|mixed + * * @throws Exception */ public function dataTable(Request $request) @@ -121,21 +122,21 @@ public function dataTable(Request $request) return datatables($query) ->addColumn('actions', function (ApplicationApi $apiKey) { return ' - -
- ' . csrf_field() . ' - ' . method_field("DELETE") . ' - + + + '.csrf_field().' + '.method_field('DELETE').' +
'; }) - ->editColumn('token' , function (ApplicationApi $apiKey) { + ->editColumn('token', function (ApplicationApi $apiKey) { return "{$apiKey->token}"; }) - ->editColumn('last_used' , function (ApplicationApi $apiKey) { + ->editColumn('last_used', function (ApplicationApi $apiKey) { return $apiKey->last_used ? $apiKey->last_used->diffForHumans() : ''; }) - ->rawColumns(['actions' , 'token']) + ->rawColumns(['actions', 'token']) ->make(); } } diff --git a/app/Http/Controllers/Admin/InvoiceController.php b/app/Http/Controllers/Admin/InvoiceController.php index 0ed1d45d9..e3fc0bca5 100644 --- a/app/Http/Controllers/Admin/InvoiceController.php +++ b/app/Http/Controllers/Admin/InvoiceController.php @@ -10,15 +10,14 @@ class InvoiceController extends Controller { - public function downloadAllInvoices() { $zip = new ZipArchive; $zip_safe_path = storage_path('invoices.zip'); $res = $zip->open($zip_safe_path, ZipArchive::CREATE | ZipArchive::OVERWRITE); $result = $this::rglob(storage_path('app/invoice/*')); - if ($res === TRUE) { - $zip->addFromString("1. Info.txt", __("Created at") . " " . now()->format("d.m.Y")); + if ($res === true) { + $zip->addFromString('1. Info.txt', __('Created at').' '.now()->format('d.m.Y')); foreach ($result as $file) { if (file_exists($file) && is_file($file)) { $zip->addFile($file, basename($file)); @@ -26,6 +25,7 @@ public function downloadAllInvoices() } $zip->close(); } + return response()->download($zip_safe_path); } @@ -37,9 +37,10 @@ public function downloadAllInvoices() public function rglob($pattern, $flags = 0) { $files = glob($pattern, $flags); - foreach (glob(dirname($pattern) . '/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) { - $files = array_merge($files, $this::rglob($dir . '/' . basename($pattern), $flags)); + foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir) { + $files = array_merge($files, $this::rglob($dir.'/'.basename($pattern), $flags)); } + return $files; } @@ -53,16 +54,15 @@ public function downloadSingleInvoice(Request $request) try { $query = Invoice::where('payment_id', '=', $id)->firstOrFail(); } catch (Throwable $e) { - return redirect()->back()->with("error", __("Error!")); + return redirect()->back()->with('error', __('Error!')); } - $invoice_path = storage_path('app/invoice/' . $query->invoice_user . '/' . $query->created_at->format("Y") . '/' . $query->invoice_name . '.pdf'); + $invoice_path = storage_path('app/invoice/'.$query->invoice_user.'/'.$query->created_at->format('Y').'/'.$query->invoice_name.'.pdf'); - if (!file_exists($invoice_path)) { - return redirect()->back()->with("error", __("Invoice does not exist on filesystem!")); + if (! file_exists($invoice_path)) { + return redirect()->back()->with('error', __('Invoice does not exist on filesystem!')); } - return response()->download($invoice_path); } } diff --git a/app/Http/Controllers/Admin/OverViewController.php b/app/Http/Controllers/Admin/OverViewController.php index 20fe0c17e..280b59d4c 100644 --- a/app/Http/Controllers/Admin/OverViewController.php +++ b/app/Http/Controllers/Admin/OverViewController.php @@ -2,18 +2,17 @@ namespace App\Http\Controllers\Admin; +use App\Classes\Pterodactyl; use App\Http\Controllers\Controller; use App\Models\Egg; use App\Models\Location; use App\Models\Nest; use App\Models\Node; use App\Models\Payment; -use App\Models\Server; -use App\Models\User; -use Illuminate\Support\Facades\Cache; -use App\Classes\Pterodactyl; use App\Models\Product; +use App\Models\Server; use App\Models\Ticket; +use App\Models\User; use Carbon\Carbon; class OverViewController extends Controller @@ -26,7 +25,7 @@ public function index() $counters = collect(); //Set basic variables in the collection $counters->put('users', User::query()->count()); - $counters->put('credits', number_format(User::query()->where("role","!=","admin")->sum('credits'), 2, '.', '')); + $counters->put('credits', number_format(User::query()->where('role', '!=', 'admin')->sum('credits'), 2, '.', '')); $counters->put('payments', Payment::query()->count()); $counters->put('eggs', Egg::query()->count()); $counters->put('nests', Nest::query()->count()); @@ -45,55 +44,109 @@ public function index() $counters->put('payments', collect()); //Get and save payments from last 2 months for later filtering and looping $payments = Payment::query()->where('created_at', '>=', Carbon::today()->startOfMonth()->subMonth())->where('status', 'paid')->get(); - //Prepare collections and set a few variables + //Prepare collections $counters['payments']->put('thisMonth', collect()); $counters['payments']->put('lastMonth', collect()); - $counters['payments']['thisMonth']->timeStart = Carbon::today()->startOfMonth()->toDateString(); - $counters['payments']['thisMonth']->timeEnd = Carbon::today()->toDateString(); - $counters['payments']['lastMonth']->timeStart = Carbon::today()->startOfMonth()->subMonth()->toDateString(); - $counters['payments']['lastMonth']->timeEnd = Carbon::today()->endOfMonth()->subMonth()->toDateString(); - + + + //Prepare subCollection 'taxPayments' + $counters->put('taxPayments', collect()); + //Get and save taxPayments from last 2 years for later filtering and looping + $taxPayments = Payment::query()->where('created_at', '>=', Carbon::today()->startOfYear()->subYear())->where('status', 'paid')->get(); + //Prepare collections + $counters['taxPayments']->put('thisYear', collect()); + $counters['taxPayments']->put('lastYear', collect()); + //Fill out variables for each currency separately - foreach($payments->where('created_at', '>=', Carbon::today()->startOfMonth()) as $payment){ + foreach ($payments->where('created_at', '>=', Carbon::today()->startOfMonth()) as $payment) { $paymentCurrency = $payment->currency_code; - if(!isset($counters['payments']['thisMonth'][$paymentCurrency])){ + if (! isset($counters['payments']['thisMonth'][$paymentCurrency])) { $counters['payments']['thisMonth']->put($paymentCurrency, collect()); $counters['payments']['thisMonth'][$paymentCurrency]->total = 0; $counters['payments']['thisMonth'][$paymentCurrency]->count = 0; } $counters['payments']['thisMonth'][$paymentCurrency]->total += $payment->total_price; - $counters['payments']['thisMonth'][$paymentCurrency]->count ++; + $counters['payments']['thisMonth'][$paymentCurrency]->count++; } - foreach($payments->where('created_at', '<', Carbon::today()->startOfMonth()) as $payment){ + foreach ($payments->where('created_at', '<', Carbon::today()->startOfMonth()) as $payment) { $paymentCurrency = $payment->currency_code; - if(!isset($counters['payments']['lastMonth'][$paymentCurrency])){ + if (! isset($counters['payments']['lastMonth'][$paymentCurrency])) { $counters['payments']['lastMonth']->put($paymentCurrency, collect()); $counters['payments']['lastMonth'][$paymentCurrency]->total = 0; $counters['payments']['lastMonth'][$paymentCurrency]->count = 0; } $counters['payments']['lastMonth'][$paymentCurrency]->total += $payment->total_price; - $counters['payments']['lastMonth'][$paymentCurrency]->count ++; + $counters['payments']['lastMonth'][$paymentCurrency]->count++; } + + //sort currencies alphabetically and set some additional variables + $counters['payments']['thisMonth'] = $counters['payments']['thisMonth']->sortKeys(); + $counters['payments']['thisMonth']->timeStart = Carbon::today()->startOfMonth()->toDateString(); + $counters['payments']['thisMonth']->timeEnd = Carbon::today()->toDateString(); + $counters['payments']['lastMonth'] = $counters['payments']['lastMonth']->sortKeys(); + $counters['payments']['lastMonth']->timeStart = Carbon::today()->startOfMonth()->subMonth()->toDateString(); + $counters['payments']['lastMonth']->timeEnd = Carbon::today()->endOfMonth()->subMonth()->toDateString(); $counters['payments']->total = Payment::query()->count(); + + foreach($taxPayments->where('created_at', '>=', Carbon::today()->startOfYear()) as $taxPayment){ + $paymentCurrency = $taxPayment->currency_code; + if(!isset($counters['taxPayments']['thisYear'][$paymentCurrency])){ + + $counters['taxPayments']['thisYear']->put($paymentCurrency, collect()); + $counters['taxPayments']['thisYear'][$paymentCurrency]->total = 0; + $counters['taxPayments']['thisYear'][$paymentCurrency]->count = 0; + $counters['taxPayments']['thisYear'][$paymentCurrency]->price = 0; + $counters['taxPayments']['thisYear'][$paymentCurrency]->taxes = 0; + } + $counters['taxPayments']['thisYear'][$paymentCurrency]->total += $taxPayment->total_price; + $counters['taxPayments']['thisYear'][$paymentCurrency]->count++; + $counters['taxPayments']['thisYear'][$paymentCurrency]->price += $taxPayment->price; + $counters['taxPayments']['thisYear'][$paymentCurrency]->taxes += $taxPayment->tax_value; + } + + foreach($taxPayments->where('created_at', '>=', Carbon::today()->startOfYear()->subYear())->where('created_at', '<', Carbon::today()->startOfYear()) as $taxPayment){ + $paymentCurrency = $taxPayment->currency_code; + if(!isset($counters['taxPayments']['lastYear'][$paymentCurrency])){ + + $counters['taxPayments']['lastYear']->put($paymentCurrency, collect()); + $counters['taxPayments']['lastYear'][$paymentCurrency]->total = 0; + $counters['taxPayments']['lastYear'][$paymentCurrency]->count = 0; + $counters['taxPayments']['lastYear'][$paymentCurrency]->price = 0; + $counters['taxPayments']['lastYear'][$paymentCurrency]->taxes = 0; + } + $counters['taxPayments']['lastYear'][$paymentCurrency]->total += $taxPayment->total_price; + $counters['taxPayments']['lastYear'][$paymentCurrency]->count++; + $counters['taxPayments']['lastYear'][$paymentCurrency]->price += $taxPayment->price; + $counters['taxPayments']['lastYear'][$paymentCurrency]->taxes += $taxPayment->tax_value; + } + + //sort currencies alphabetically and set some additional variables + $counters['taxPayments']['thisYear'] = $counters['taxPayments']['thisYear']->sortKeys(); + $counters['taxPayments']['thisYear']->timeStart = Carbon::today()->startOfYear()->toDateString(); + $counters['taxPayments']['thisYear']->timeEnd = Carbon::today()->toDateString(); + $counters['taxPayments']['lastYear'] = $counters['taxPayments']['lastYear']->sortKeys(); + $counters['taxPayments']['lastYear']->timeStart = Carbon::today()->startOfYear()->subYear()->toDateString(); + $counters['taxPayments']['lastYear']->timeEnd = Carbon::today()->endOfYear()->subYear()->toDateString(); + $lastEgg = Egg::query()->latest('updated_at')->first(); $syncLastUpdate = $lastEgg ? $lastEgg->updated_at->isoFormat('LLL') : __('unknown'); - - //Get node information and prepare collection $pteroNodeIds = []; - foreach(Pterodactyl::getNodes() as $pteroNode){ + foreach (Pterodactyl::getNodes() as $pteroNode) { array_push($pteroNodeIds, $pteroNode['attributes']['id']); } $nodes = collect(); - foreach($DBnodes = Node::query()->get() as $DBnode){ //gets all node information and prepares the structure + foreach ($DBnodes = Node::query()->get() as $DBnode) { //gets all node information and prepares the structure $nodeId = $DBnode['id']; - if(!in_array($nodeId, $pteroNodeIds)) continue; //Check if node exists on pterodactyl too, if not, skip + if (! in_array($nodeId, $pteroNodeIds)) { + continue; + } //Check if node exists on pterodactyl too, if not, skip $nodes->put($nodeId, collect()); $nodes[$nodeId]->name = $DBnode['name']; $pteroNode = Pterodactyl::getNode($nodeId); - $nodes[$nodeId]->usagePercent = round(max($pteroNode['allocated_resources']['memory']/($pteroNode['memory']*($pteroNode['memory_overallocate']+100)/100), $pteroNode['allocated_resources']['disk']/($pteroNode['disk']*($pteroNode['disk_overallocate']+100)/100))*100, 2); + $nodes[$nodeId]->usagePercent = round(max($pteroNode['allocated_resources']['memory'] / ($pteroNode['memory'] * ($pteroNode['memory_overallocate'] + 100) / 100), $pteroNode['allocated_resources']['disk'] / ($pteroNode['disk'] * ($pteroNode['disk_overallocate'] + 100) / 100)) * 100, 2); $counters['totalUsagePercent'] += $nodes[$nodeId]->usagePercent; $nodes[$nodeId]->totalServers = 0; @@ -101,66 +154,61 @@ public function index() $nodes[$nodeId]->totalEarnings = 0; $nodes[$nodeId]->activeEarnings = 0; } - $counters['totalUsagePercent'] = ($DBnodes->count())?round($counters['totalUsagePercent']/$DBnodes->count(), 2):0; + $counters['totalUsagePercent'] = ($DBnodes->count()) ? round($counters['totalUsagePercent'] / $DBnodes->count(), 2) : 0; - foreach(Pterodactyl::getServers() as $server){ //gets all servers from Pterodactyl and calculates total of credit usage for each node separately + total + foreach (Pterodactyl::getServers() as $server) { //gets all servers from Pterodactyl and calculates total of credit usage for each node separately + total $nodeId = $server['attributes']['node']; - - if($CPServer = Server::query()->where('pterodactyl_id', $server['attributes']['id'])->first()){ + + if ($CPServer = Server::query()->where('pterodactyl_id', $server['attributes']['id'])->first()) { $price = Product::query()->where('id', $CPServer->product_id)->first()->price; - if (!$CPServer->suspended){ + if (! $CPServer->suspended) { $counters['earnings']->active += $price; - $counters['servers']->active ++; + $counters['servers']->active++; $nodes[$nodeId]->activeEarnings += $price; - $nodes[$nodeId]->activeServers ++; + $nodes[$nodeId]->activeServers++; } $counters['earnings']->total += $price; - $counters['servers']->total ++; + $counters['servers']->total++; $nodes[$nodeId]->totalEarnings += $price; - $nodes[$nodeId]->totalServers ++; + $nodes[$nodeId]->totalServers++; } } - - //Get latest tickets - $tickets = Cache::remember('tickets', self::TTL, function(){ - $output = collect(); - foreach(Ticket::query()->latest()->take(3)->get() as $ticket){ - $output->put($ticket->ticket_id, collect()); - $output[$ticket->ticket_id]->title = $ticket->title; - $user = User::query()->where('id', $ticket->user_id)->first(); - $output[$ticket->ticket_id]->user_id = $user->id; - $output[$ticket->ticket_id]->user = $user->name; - $output[$ticket->ticket_id]->status = $ticket->status; - $output[$ticket->ticket_id]->last_updated = $ticket->updated_at->diffForHumans(); - switch ($ticket->status) { - case 'Open': - $output[$ticket->ticket_id]->statusBadgeColor = 'badge-success'; - break; - case 'Closed': - $output[$ticket->ticket_id]->statusBadgeColor = 'badge-danger'; - break; - case 'Answered': - $output[$ticket->ticket_id]->statusBadgeColor = 'badge-info'; - break; - default: - $output[$ticket->ticket_id]->statusBadgeColor = 'badge-warning'; - break; - } + $tickets = collect(); + foreach (Ticket::query()->latest()->take(5)->get() as $ticket) { + $tickets->put($ticket->ticket_id, collect()); + $tickets[$ticket->ticket_id]->title = $ticket->title; + $user = User::query()->where('id', $ticket->user_id)->first(); + $tickets[$ticket->ticket_id]->user_id = $user->id; + $tickets[$ticket->ticket_id]->user = $user->name; + $tickets[$ticket->ticket_id]->status = $ticket->status; + $tickets[$ticket->ticket_id]->last_updated = $ticket->updated_at->diffForHumans(); + switch ($ticket->status) { + case 'Open': + $tickets[$ticket->ticket_id]->statusBadgeColor = 'badge-success'; + break; + case 'Closed': + $tickets[$ticket->ticket_id]->statusBadgeColor = 'badge-danger'; + break; + case 'Answered': + $tickets[$ticket->ticket_id]->statusBadgeColor = 'badge-info'; + break; + default: + $tickets[$ticket->ticket_id]->statusBadgeColor = 'badge-warning'; + break; } - return $output; - }); + } return view('admin.overview.index', [ - 'counters' => $counters, - 'nodes' => $nodes, + 'counters' => $counters, + 'nodes' => $nodes, 'syncLastUpdate' => $syncLastUpdate, - 'deletedNodesPresent'=> ($DBnodes->count() != count($pteroNodeIds))?true:false, - 'perPageLimit' => ($counters['servers']->total != Server::query()->count())?true:false, - 'tickets' => $tickets + 'deletedNodesPresent' => ($DBnodes->count() != count($pteroNodeIds)) ? true : false, + 'perPageLimit' => ($counters['servers']->total != Server::query()->count()) ? true : false, + 'tickets' => $tickets, ]); - } + } /** * @description Sync locations,nodes,nests,eggs with the linked pterodactyl panel diff --git a/app/Http/Controllers/Admin/PaymentController.php b/app/Http/Controllers/Admin/PaymentController.php index 8d3a0d239..bccc64e8a 100644 --- a/app/Http/Controllers/Admin/PaymentController.php +++ b/app/Http/Controllers/Admin/PaymentController.php @@ -4,13 +4,10 @@ use App\Events\UserUpdateCreditsEvent; use App\Http\Controllers\Controller; -use App\Models\InvoiceSettings; +use App\Models\PartnerDiscount; use App\Models\Payment; -use App\Models\ShopProduct; -use App\Models\Settings; use App\Models\User; -use App\Notifications\InvoiceNotification; -use App\Notifications\ConfirmPaymentNotification; +use App\Models\ShopProduct; use Exception; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; @@ -19,633 +16,124 @@ use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\DB; -use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\Storage; -use LaravelDaily\Invoices\Classes\Buyer; -use LaravelDaily\Invoices\Classes\InvoiceItem; -use LaravelDaily\Invoices\Classes\Party; -use LaravelDaily\Invoices\Invoice; -use PayPalCheckoutSdk\Core\PayPalHttpClient; -use PayPalCheckoutSdk\Core\ProductionEnvironment; -use PayPalCheckoutSdk\Core\SandboxEnvironment; -use PayPalCheckoutSdk\Orders\OrdersCaptureRequest; -use PayPalCheckoutSdk\Orders\OrdersCreateRequest; -use PayPalHttp\HttpException; -use Stripe\Stripe; -use Symfony\Component\Intl\Currencies; +use App\Helpers\ExtensionHelper; class PaymentController extends Controller { - /** * @return Application|Factory|View */ public function index() { return view('admin.payments.index')->with([ - 'payments' => Payment::paginate(15) + 'payments' => Payment::paginate(15), ]); } /** - * @param Request $request - * @param ShopProduct $shopProduct + * @param Request $request + * @param ShopProduct $shopProduct * @return Application|Factory|View */ - public function checkOut(Request $request, ShopProduct $shopProduct) - { - return view('store.checkout')->with([ - 'product' => $shopProduct, - 'taxvalue' => $shopProduct->getTaxValue(), - 'taxpercent' => $shopProduct->getTaxPercent(), - 'total' => $shopProduct->getTotalPrice() - ]); - } - - /** - * @param Request $request - * @param ShopProduct $shopProduct - * @return RedirectResponse - */ - public function PaypalPay(Request $request, ShopProduct $shopProduct) - { - $request = new OrdersCreateRequest(); - $request->prefer('return=representation'); - $request->body = [ - "intent" => "CAPTURE", - "purchase_units" => [ - [ - "reference_id" => uniqid(), - "description" => $shopProduct->description, - "amount" => [ - "value" => $shopProduct->getTotalPrice(), - 'currency_code' => strtoupper($shopProduct->currency_code), - 'breakdown' => [ - 'item_total' => - [ - 'currency_code' => strtoupper($shopProduct->currency_code), - 'value' => $shopProduct->price, - ], - 'tax_total' => - [ - 'currency_code' => strtoupper($shopProduct->currency_code), - 'value' => $shopProduct->getTaxValue(), - ] - ] - ] - ] - ], - "application_context" => [ - "cancel_url" => route('payment.Cancel'), - "return_url" => route('payment.PaypalSuccess', ['product' => $shopProduct->id]), - 'brand_name' => config('app.name', 'Laravel'), - 'shipping_preference' => 'NO_SHIPPING' - ] - - - ]; - - - try { - // Call API with your client and get a response for your call - $response = $this->getPayPalClient()->execute($request); - return redirect()->away($response->result->links[1]->href); - - // If call returns body in response, you can get the deserialized version from the result attribute of the response - } catch (HttpException $ex) { - echo $ex->statusCode; - dd(json_decode($ex->getMessage())); - } - } - - /** - * @return PayPalHttpClient - */ - protected function getPayPalClient() - { - $environment = env('APP_ENV') == 'local' - ? new SandboxEnvironment($this->getPaypalClientId(), $this->getPaypalClientSecret()) - : new ProductionEnvironment($this->getPaypalClientId(), $this->getPaypalClientSecret()); - - return new PayPalHttpClient($environment); - } - - /** - * @return string - */ - protected function getPaypalClientId() - { - return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID") : config("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID"); - } - - /** - * @return string - */ - protected function getPaypalClientSecret() - { - return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") : config("SETTINGS::PAYMENTS:PAYPAL:SECRET"); - } - - /** - * @param Request $laravelRequest - */ - public function PaypalSuccess(Request $laravelRequest) + public function checkOut(ShopProduct $shopProduct) { - /** @var ShopProduct $shopProduct */ - $shopProduct = ShopProduct::findOrFail($laravelRequest->input('product')); - - /** @var User $user */ - $user = Auth::user(); - - $request = new OrdersCaptureRequest($laravelRequest->input('token')); - $request->prefer('return=representation'); - try { - // Call API with your client and get a response for your call - $response = $this->getPayPalClient()->execute($request); - if ($response->statusCode == 201 || $response->statusCode == 200) { - - //update server limit - if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) { - if ($user->server_limit < config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) { - $user->update(['server_limit' => config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]); - } - } - - //update User with bought item - if ($shopProduct->type=="Credits") { - $user->increment('credits', $shopProduct->quantity); - }elseif ($shopProduct->type=="Server slots"){ - $user->increment('server_limit', $shopProduct->quantity); - } - - - //update role give Referral-reward - if ($user->role == 'member') { - $user->update(['role' => 'client']); - - if((config("SETTINGS::REFERRAL:MODE") == "commission" || config("SETTINGS::REFERRAL:MODE") == "both") && $shopProduct->type=="Credits"){ - if($ref_user = DB::table("user_referrals")->where('registered_user_id', '=', $user->id)->first()){ - $ref_user = User::findOrFail($ref_user->referral_id); - $increment = number_format($shopProduct->quantity/100*config("SETTINGS::REFERRAL:PERCENTAGE"),0,"",""); - $ref_user->increment('credits', $increment); - - //LOGS REFERRALS IN THE ACTIVITY LOG - activity() - ->performedOn($user) - ->causedBy($ref_user) - ->log('gained '. $increment.' '.config("SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME").' for commission-referral of '.$user->name.' (ID:'.$user->id.')'); - } - - } - - } - - //store payment - $payment = Payment::create([ - 'user_id' => $user->id, - 'payment_id' => $response->result->id, - 'payment_method' => 'paypal', - 'type' => $shopProduct->type, - 'status' => 'paid', - 'amount' => $shopProduct->quantity, - 'price' => $shopProduct->price, - 'tax_value' => $shopProduct->getTaxValue(), - 'tax_percent' => $shopProduct->getTaxPercent(), - 'total_price' => $shopProduct->getTotalPrice(), - 'currency_code' => $shopProduct->currency_code, - 'shop_item_product_id' => $shopProduct->id, - ]); - - - event(new UserUpdateCreditsEvent($user)); - - //only create invoice if SETTINGS::INVOICE:ENABLED is true - if (config('SETTINGS::INVOICE:ENABLED') == 'true') { - $this->createInvoice($user, $payment, 'paid', $shopProduct->currency_code); - } - - - //redirect back to home - return redirect()->route('home')->with('success', __('Your credit balance has been increased!')); - } + $extensions = ExtensionHelper::getAllExtensionsByNamespace('PaymentGateways'); - - // If call returns body in response, you can get the deserialized version from the result attribute of the response - if (env('APP_ENV') == 'local') { - dd($response); - } else { - abort(500); - } - } catch (HttpException $ex) { - if (env('APP_ENV') == 'local') { - echo $ex->statusCode; - dd($ex->getMessage()); - } else { - abort(422); - } + // build a paymentgateways array that contains the routes for the payment gateways and the image path for the payment gateway which lays in public/images/Extensions/PaymentGateways with the extensionname in lowercase + $paymentGateways = []; + foreach ($extensions as $extension) { + $extensionName = basename($extension); + $payment = new \stdClass(); + $payment->name = ExtensionHelper::getExtensionConfig($extensionName, 'name'); + $payment->image = asset('images/Extensions/PaymentGateways/' . strtolower($extensionName) . '_logo.png'); + $paymentGateways[] = $payment; } - } - - - /** - * @param Request $request - */ - public function Cancel(Request $request) - { - return redirect()->route('store.index')->with('success', 'Payment was Canceled'); - } - - /** - * @param Request $request - * @param ShopProduct $shopProduct - * @return RedirectResponse - */ - public function StripePay(Request $request, ShopProduct $shopProduct) - { - $stripeClient = $this->getStripeClient(); + $discount = PartnerDiscount::getDiscount(); - $request = $stripeClient->checkout->sessions->create([ - 'line_items' => [ - [ - 'price_data' => [ - 'currency' => $shopProduct->currency_code, - 'product_data' => [ - 'name' => $shopProduct->display, - 'description' => $shopProduct->description, - ], - 'unit_amount_decimal' => round($shopProduct->price * 100, 2), - ], - 'quantity' => 1, - ], - [ - 'price_data' => [ - 'currency' => $shopProduct->currency_code, - 'product_data' => [ - 'name' => 'Product Tax', - 'description' => $shopProduct->getTaxPercent() . "%", - ], - 'unit_amount_decimal' => round($shopProduct->getTaxValue(), 2) * 100, - ], - 'quantity' => 1, - ] - ], - - 'mode' => 'payment', - "payment_method_types" => str_getcsv(config("SETTINGS::PAYMENTS:STRIPE:METHODS")), - 'success_url' => route('payment.StripeSuccess', ['product' => $shopProduct->id]) . '&session_id={CHECKOUT_SESSION_ID}', - 'cancel_url' => route('payment.Cancel'), + return view('store.checkout')->with([ + 'product' => $shopProduct, + 'discountpercent' => $discount, + 'discountvalue' => $discount * $shopProduct->price / 100, + 'discountedprice' => $shopProduct->getPriceAfterDiscount(), + 'taxvalue' => $shopProduct->getTaxValue(), + 'taxpercent' => $shopProduct->getTaxPercent(), + 'total' => $shopProduct->getTotalPrice(), + 'paymentGateways' => $paymentGateways, ]); - - - - return redirect($request->url, 303); } /** - * @param Request $request + * @param Request $request + * @param ShopProduct $shopProduct + * @return RedirectResponse */ - public function StripeSuccess(Request $request) + public function FreePay(ShopProduct $shopProduct) { - /** @var ShopProduct $shopProduct */ - $shopProduct = ShopProduct::findOrFail($request->input('product')); + //check if the product is really free or the discount is 100% + if ($shopProduct->getTotalPrice() > 0) return redirect()->route('home')->with('error', __('An error ocured. Please try again.')); + //give product /** @var User $user */ $user = Auth::user(); - $stripeClient = $this->getStripeClient(); - - try { - //get stripe data - $paymentSession = $stripeClient->checkout->sessions->retrieve($request->input('session_id')); - $paymentIntent = $stripeClient->paymentIntents->retrieve($paymentSession->payment_intent); - - //get DB entry of this payment ID if existing - $paymentDbEntry = Payment::where('payment_id', $paymentSession->payment_intent)->count(); - - // check if payment is 100% completed and payment does not exist in db already - if ($paymentSession->status == "complete" && $paymentIntent->status == "succeeded" && $paymentDbEntry == 0) { - - - - //update server limit - if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) { - if ($user->server_limit < config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) { - $user->update(['server_limit' => config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]); - } - } - - //update User with bought item - if ($shopProduct->type=="Credits") { - $user->increment('credits', $shopProduct->quantity); - }elseif ($shopProduct->type=="Server slots"){ - $user->increment('server_limit', $shopProduct->quantity); - } - - //update role give Referral-reward - if ($user->role == 'member') { - $user->update(['role' => 'client']); - - if((config("SETTINGS::REFERRAL:MODE") == "commission" || config("SETTINGS::REFERRAL:MODE") == "both") && $shopProduct->type=="Credits"){ - if($ref_user = DB::table("user_referrals")->where('registered_user_id', '=', $user->id)->first()){ - $ref_user = User::findOrFail($ref_user->referral_id); - $increment = number_format($shopProduct->quantity/100*config("SETTINGS::REFERRAL:PERCENTAGE"),0,"",""); - $ref_user->increment('credits', $increment); - - //LOGS REFERRALS IN THE ACTIVITY LOG - activity() - ->performedOn($user) - ->causedBy($ref_user) - ->log('gained '. $increment.' '.config("SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME").' for commission-referral of '.$user->name.' (ID:'.$user->id.')'); - } - - } - - } - - //store paid payment - $payment = Payment::create([ - 'user_id' => $user->id, - 'payment_id' => $paymentSession->payment_intent, - 'payment_method' => 'stripe', - 'type' => $shopProduct->type, - 'status' => 'paid', - 'amount' => $shopProduct->quantity, - 'price' => $shopProduct->price, - 'tax_value' => $shopProduct->getTaxValue(), - 'total_price' => $shopProduct->getTotalPrice(), - 'tax_percent' => $shopProduct->getTaxPercent(), - 'currency_code' => $shopProduct->currency_code, - 'shop_item_product_id' => $shopProduct->id, - ]); - - //payment notification - $user->notify(new ConfirmPaymentNotification($payment)); - - event(new UserUpdateCreditsEvent($user)); - - //only create invoice if SETTINGS::INVOICE:ENABLED is true - if (config('SETTINGS::INVOICE:ENABLED') == 'true') { - $this->createInvoice($user, $payment, 'paid', $shopProduct->currency_code); - } - - //redirect back to home - return redirect()->route('home')->with('success', __('Your credit balance has been increased!')); - } else { - if ($paymentIntent->status == "processing") { - - //store processing payment - $payment = Payment::create([ - 'user_id' => $user->id, - 'payment_id' => $paymentSession->payment_intent, - 'payment_method' => 'stripe', - 'type' => $shopProduct->type, - 'status' => 'processing', - 'amount' => $shopProduct->quantity, - 'price' => $shopProduct->price, - 'tax_value' => $shopProduct->getTaxValue(), - 'total_price' => $shopProduct->getTotalPrice(), - 'tax_percent' => $shopProduct->getTaxPercent(), - 'currency_code' => $shopProduct->currency_code, - 'shop_item_product_id' => $shopProduct->id, - ]); - - //only create invoice if SETTINGS::INVOICE:ENABLED is true - if (config('SETTINGS::INVOICE:ENABLED') == 'true') { - $this->createInvoice($user, $payment, 'paid', $shopProduct->currency_code); - } - - //redirect back to home - return redirect()->route('home')->with('success', __('Your payment is being processed!')); - } - if ($paymentDbEntry == 0 && $paymentIntent->status != "processing") { - $stripeClient->paymentIntents->cancel($paymentIntent->id); - - //redirect back to home - return redirect()->route('home')->with('success', __('Your payment has been canceled!')); - } else { - abort(402); - } - } - } catch (HttpException $ex) { - if (env('APP_ENV') == 'local') { - echo $ex->statusCode; - dd($ex->getMessage()); - } else { - abort(422); - } - } - } - - /** - * @param Request $request - */ - protected function handleStripePaymentSuccessHook($paymentIntent) - { - try { - // Get payment db entry - $payment = Payment::where('payment_id', $paymentIntent->id)->first(); - $user = User::where('id', $payment->user_id)->first(); - - if ($paymentIntent->status == 'succeeded' && $payment->status == 'processing') { - - - //update server limit - if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) { - if ($user->server_limit < config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) { - $user->update(['server_limit' => config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]); - } - } - //update User with bought item - if ($shopProduct->type=="Credits") { - $user->increment('credits', $shopProduct->quantity); - }elseif ($shopProduct->type=="Server slots"){ - $user->increment('server_limit', $shopProduct->quantity); - } - - //update role give Referral-reward - if ($user->role == 'member') { - $user->update(['role' => 'client']); - - if((config("SETTINGS::REFERRAL:MODE") == "commission" || config("SETTINGS::REFERRAL:MODE") == "both")&& $shopProduct->type=="Credits"){ - if($ref_user = DB::table("user_referrals")->where('registered_user_id', '=', $user->id)->first()){ - $ref_user = User::findOrFail($ref_user->referral_id); - $increment = number_format($shopProduct->quantity/100*config("SETTINGS::REFERRAL:PERCENTAGE"),0,"",""); - $ref_user->increment('credits', $increment); - - //LOGS REFERRALS IN THE ACTIVITY LOG - activity() - ->performedOn($user) - ->causedBy($ref_user) - ->log('gained '. $increment.' '.config("SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME").' for commission-referral of '.$user->name.' (ID:'.$user->id.')'); - } - - } - - } + //not updating server limit - //update payment db entry status - $payment->update(['status' => 'paid']); - - //payment notification - $user->notify(new ConfirmPaymentNotification($payment)); - event(new UserUpdateCreditsEvent($user)); - - //only create invoice if SETTINGS::INVOICE:ENABLED is true - if (config('SETTINGS::INVOICE:ENABLED') == 'true') { - $this->createInvoice($user, $payment, 'paid', strtoupper($paymentIntent->currency)); - } - } - } catch (HttpException $ex) { - abort(422); + //update User with bought item + if ($shopProduct->type == "Credits") { + $user->increment('credits', $shopProduct->quantity); + } elseif ($shopProduct->type == "Server slots") { + $user->increment('server_limit', $shopProduct->quantity); } - } - - /** - * @param Request $request - */ - public function StripeWebhooks(Request $request) - { - \Stripe\Stripe::setApiKey($this->getStripeSecret()); - try { - $payload = @file_get_contents('php://input'); - $sig_header = $request->header('Stripe-Signature'); - $event = null; - $event = \Stripe\Webhook::constructEvent( - $payload, - $sig_header, - $this->getStripeEndpointSecret() - ); - } catch (\UnexpectedValueException $e) { - // Invalid payload + //skipped the referral commission, because the user did not pay anything. + + //not giving client role + + //store payment + $payment = Payment::create([ + 'user_id' => $user->id, + 'payment_id' => uniqid(), + 'payment_method' => 'free', + 'type' => $shopProduct->type, + 'status' => 'paid', + 'amount' => $shopProduct->quantity, + 'price' => $shopProduct->price - ($shopProduct->price * PartnerDiscount::getDiscount() / 100), + 'tax_value' => $shopProduct->getTaxValue(), + 'tax_percent' => $shopProduct->getTaxPercent(), + 'total_price' => $shopProduct->getTotalPrice(), + 'currency_code' => $shopProduct->currency_code, + 'shop_item_product_id' => $shopProduct->id, + ]); - abort(400); - } catch (\Stripe\Exception\SignatureVerificationException $e) { - // Invalid signature + event(new UserUpdateCreditsEvent($user)); - abort(400); - } + //not sending an invoice - // Handle the event - switch ($event->type) { - case 'payment_intent.succeeded': - $paymentIntent = $event->data->object; // contains a \Stripe\PaymentIntent - $this->handleStripePaymentSuccessHook($paymentIntent); - break; - default: - echo 'Received unknown event type ' . $event->type; - } + //redirect back to home + return redirect()->route('home')->with('success', __('Your credit balance has been increased!')); } - /** - * @return \Stripe\StripeClient - */ - protected function getStripeClient() + public function pay(Request $request) { - return new \Stripe\StripeClient($this->getStripeSecret()); - } + $product = ShopProduct::find($request->product_id); + $paymentGateway = $request->payment_method; - /** - * @return string - */ - protected function getStripeSecret() - { - return env('APP_ENV') == 'local' - ? config("SETTINGS::PAYMENTS:STRIPE:TEST_SECRET") - : config("SETTINGS::PAYMENTS:STRIPE:SECRET"); + return redirect()->route('payment.' . $paymentGateway . 'Pay', ['shopProduct' => $product->id]); } /** - * @return string + * @param Request $request */ - protected function getStripeEndpointSecret() - { - return env('APP_ENV') == 'local' - ? config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET") - : config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET"); - } - - - protected function createInvoice($user, $payment, $paymentStatus, $currencyCode) + public function Cancel(Request $request) { - $shopProduct = ShopProduct::where('id', $payment->shop_item_product_id)->first(); - //create invoice - $lastInvoiceID = \App\Models\Invoice::where("invoice_name", "like", "%" . now()->format('mY') . "%")->count("id"); - $newInvoiceID = $lastInvoiceID + 1; - $logoPath = storage_path('app/public/logo.png'); - - $seller = new Party([ - 'name' => config("SETTINGS::INVOICE:COMPANY_NAME"), - 'phone' => config("SETTINGS::INVOICE:COMPANY_PHONE"), - 'address' => config("SETTINGS::INVOICE:COMPANY_ADDRESS"), - 'vat' => config("SETTINGS::INVOICE:COMPANY_VAT"), - 'custom_fields' => [ - 'E-Mail' => config("SETTINGS::INVOICE:COMPANY_MAIL"), - "Web" => config("SETTINGS::INVOICE:COMPANY_WEBSITE") - ], - ]); - - - $customer = new Buyer([ - 'name' => $user->name, - 'custom_fields' => [ - 'E-Mail' => $user->email, - 'Client ID' => $user->id, - ], - ]); - $item = (new InvoiceItem()) - ->title($shopProduct->description) - ->pricePerUnit($shopProduct->price); - - $notes = [ - __("Payment method") . ": " . $payment->payment_method, - ]; - $notes = implode("
", $notes); - - - $invoice = Invoice::make() - ->template('controlpanel') - ->name(__("Invoice")) - ->buyer($customer) - ->seller($seller) - ->discountByPercent(0) - ->taxRate(floatval($shopProduct->getTaxPercent())) - ->shipping(0) - ->addItem($item) - ->status(__($paymentStatus)) - ->series(now()->format('mY')) - ->delimiter("-") - ->sequence($newInvoiceID) - ->serialNumberFormat(config("SETTINGS::INVOICE:PREFIX") . '{DELIMITER}{SERIES}{SEQUENCE}') - ->currencyCode($currencyCode) - ->currencySymbol(Currencies::getSymbol($currencyCode)) - ->notes($notes); - - if (file_exists($logoPath)) { - $invoice->logo($logoPath); - } - - //Save the invoice in "storage\app\invoice\USER_ID\YEAR" - $invoice->filename = $invoice->getSerialNumber() . '.pdf'; - $invoice->render(); - Storage::disk("local")->put("invoice/" . $user->id . "/" . now()->format('Y') . "/" . $invoice->filename, $invoice->output); - - - \App\Models\Invoice::create([ - 'invoice_user' => $user->id, - 'invoice_name' => $invoice->getSerialNumber(), - 'payment_id' => $payment->payment_id, - ]); - - //Send Invoice per Mail - $user->notify(new InvoiceNotification($invoice, $user, $payment)); + return redirect()->route('store.index')->with('info', 'Payment was Canceled'); } /** * @return JsonResponse|mixed + * * @throws Exception */ public function dataTable() @@ -653,8 +141,9 @@ public function dataTable() $query = Payment::with('user'); return datatables($query) - ->editColumn('user', function (Payment $payment) { - return $payment->user->name; + + ->addColumn('user', function (Payment $payment) { + return ($payment->user) ? '' . $payment->user->name . '' : __('Unknown user'); }) ->editColumn('price', function (Payment $payment) { return $payment->formatToCurrency($payment->price); @@ -670,12 +159,15 @@ public function dataTable() }) ->editColumn('created_at', function (Payment $payment) { - return $payment->created_at ? $payment->created_at->diffForHumans() : ''; + return [ + 'display' => $payment->created_at ? $payment->created_at->diffForHumans() : '', + 'raw' => $payment->created_at ? strtotime($payment->created_at) : '' + ]; }) ->addColumn('actions', function (Payment $payment) { - return ''; + return ''; }) - ->rawColumns(['actions']) + ->rawColumns(['actions', 'user']) ->make(true); } } diff --git a/app/Http/Controllers/Admin/ProductController.php b/app/Http/Controllers/Admin/ProductController.php index 6b855f9fe..5e9157d9f 100644 --- a/app/Http/Controllers/Admin/ProductController.php +++ b/app/Http/Controllers/Admin/ProductController.php @@ -6,7 +6,6 @@ use App\Models\Location; use App\Models\Nest; use App\Models\Product; -use App\Models\Settings; use Exception; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; @@ -52,33 +51,33 @@ public function clone(Request $request, Product $product) /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return RedirectResponse */ public function store(Request $request) { $request->validate([ - "name" => "required|max:30", - "price" => "required|numeric|max:1000000|min:0", - "memory" => "required|numeric|max:1000000|min:5", - "cpu" => "required|numeric|max:1000000|min:0", - "swap" => "required|numeric|max:1000000|min:0", - "description" => "required|string|max:191", - "disk" => "required|numeric|max:1000000|min:5", - "minimum_credits" => "required|numeric|max:1000000|min:-1", - "io" => "required|numeric|max:1000000|min:0", - "databases" => "required|numeric|max:1000000|min:0", - "backups" => "required|numeric|max:1000000|min:0", - "allocations" => "required|numeric|max:1000000|min:0", - "nodes.*" => "required|exists:nodes,id", - "eggs.*" => "required|exists:eggs,id", - "disabled" => "nullable", + 'name' => 'required|max:30', + 'price' => 'required|numeric|max:1000000|min:0', + 'memory' => 'required|numeric|max:1000000|min:5', + 'cpu' => 'required|numeric|max:1000000|min:0', + 'swap' => 'required|numeric|max:1000000|min:0', + 'description' => 'required|string|max:191', + 'disk' => 'required|numeric|max:1000000|min:5', + 'minimum_credits' => 'required|numeric|max:1000000|min:-1', + 'io' => 'required|numeric|max:1000000|min:0', + 'databases' => 'required|numeric|max:1000000|min:0', + 'backups' => 'required|numeric|max:1000000|min:0', + 'allocations' => 'required|numeric|max:1000000|min:0', + 'nodes.*' => 'required|exists:nodes,id', + 'eggs.*' => 'required|exists:eggs,id', + 'disabled' => 'nullable', ]); - $disabled = !is_null($request->input('disabled')); + $disabled = ! is_null($request->input('disabled')); $product = Product::create(array_merge($request->all(), ['disabled' => $disabled])); - #link nodes and eggs + //link nodes and eggs $product->eggs()->attach($request->input('eggs')); $product->nodes()->attach($request->input('nodes')); @@ -88,21 +87,21 @@ public function store(Request $request) /** * Display the specified resource. * - * @param Product $product + * @param Product $product * @return Application|Factory|View */ public function show(Product $product) { return view('admin.products.show', [ 'product' => $product, - 'minimum_credits' => config("SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER"), + 'minimum_credits' => config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER'), ]); } /** * Show the form for editing the specified resource. * - * @param Product $product + * @param Product $product * @return Application|Factory|View */ public function edit(Product $product) @@ -117,34 +116,34 @@ public function edit(Product $product) /** * Update the specified resource in storage. * - * @param Request $request - * @param Product $product + * @param Request $request + * @param Product $product * @return RedirectResponse */ public function update(Request $request, Product $product): RedirectResponse { $request->validate([ - "name" => "required|max:30", - "price" => "required|numeric|max:1000000|min:0", - "memory" => "required|numeric|max:1000000|min:5", - "cpu" => "required|numeric|max:1000000|min:0", - "swap" => "required|numeric|max:1000000|min:0", - "description" => "required|string|max:191", - "disk" => "required|numeric|max:1000000|min:5", - "io" => "required|numeric|max:1000000|min:0", - "minimum_credits" => "required|numeric|max:1000000|min:-1", - "databases" => "required|numeric|max:1000000|min:0", - "backups" => "required|numeric|max:1000000|min:0", - "allocations" => "required|numeric|max:1000000|min:0", - "nodes.*" => "required|exists:nodes,id", - "eggs.*" => "required|exists:eggs,id", - "disabled" => "nullable", + 'name' => 'required|max:30', + 'price' => 'required|numeric|max:1000000|min:0', + 'memory' => 'required|numeric|max:1000000|min:5', + 'cpu' => 'required|numeric|max:1000000|min:0', + 'swap' => 'required|numeric|max:1000000|min:0', + 'description' => 'required|string|max:191', + 'disk' => 'required|numeric|max:1000000|min:5', + 'io' => 'required|numeric|max:1000000|min:0', + 'minimum_credits' => 'required|numeric|max:1000000|min:-1', + 'databases' => 'required|numeric|max:1000000|min:0', + 'backups' => 'required|numeric|max:1000000|min:0', + 'allocations' => 'required|numeric|max:1000000|min:0', + 'nodes.*' => 'required|exists:nodes,id', + 'eggs.*' => 'required|exists:eggs,id', + 'disabled' => 'nullable', ]); - $disabled = !is_null($request->input('disabled')); + $disabled = ! is_null($request->input('disabled')); $product->update(array_merge($request->all(), ['disabled' => $disabled])); - #link nodes and eggs + //link nodes and eggs $product->eggs()->detach(); $product->nodes()->detach(); $product->eggs()->attach($request->input('eggs')); @@ -154,13 +153,13 @@ public function update(Request $request, Product $product): RedirectResponse } /** - * @param Request $request - * @param Product $product + * @param Request $request + * @param Product $product * @return RedirectResponse */ public function disable(Request $request, Product $product) { - $product->update(['disabled' => !$product->disabled]); + $product->update(['disabled' => ! $product->disabled]); return redirect()->route('admin.products.index')->with('success', 'Product has been updated!'); } @@ -168,7 +167,7 @@ public function disable(Request $request, Product $product) /** * Remove the specified resource from storage. * - * @param Product $product + * @param Product $product * @return RedirectResponse */ public function destroy(Product $product) @@ -179,12 +178,13 @@ public function destroy(Product $product) } $product->delete(); + return redirect()->back()->with('success', __('Product has been removed!')); } - /** * @return JsonResponse|mixed + * * @throws Exception|Exception */ public function dataTable() @@ -194,14 +194,14 @@ public function dataTable() return datatables($query) ->addColumn('actions', function (Product $product) { return ' - - - - -
- ' . csrf_field() . ' - ' . method_field("DELETE") . ' - + + + + + + '.csrf_field().' + '.method_field('DELETE').' +
'; }) @@ -216,18 +216,22 @@ public function dataTable() return $product->eggs()->count(); }) ->addColumn('disabled', function (Product $product) { - $checked = $product->disabled == false ? "checked" : ""; + $checked = $product->disabled == false ? 'checked' : ''; + return ' -
- ' . csrf_field() . ' - ' . method_field("PATCH") . ' + + '.csrf_field().' + '.method_field('PATCH').'
- - + +
'; }) + ->editColumn('minimum_credits', function (Product $product) { + return $product->minimum_credits==-1 ? config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER') : $product->minimum_credits; + }) ->editColumn('created_at', function (Product $product) { return $product->created_at ? $product->created_at->diffForHumans() : ''; }) diff --git a/app/Http/Controllers/Admin/ServerController.php b/app/Http/Controllers/Admin/ServerController.php index a34b097b2..06d2cc22b 100644 --- a/app/Http/Controllers/Admin/ServerController.php +++ b/app/Http/Controllers/Admin/ServerController.php @@ -3,10 +3,9 @@ namespace App\Http\Controllers\Admin; use App\Classes\Pterodactyl; -use App\Classes\PterodactylWrapper; use App\Http\Controllers\Controller; use App\Models\Server; -use App\Models\Settings; +use App\Models\User; use Exception; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; @@ -41,7 +40,7 @@ public function create() /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return Response */ public function store(Request $request) @@ -52,7 +51,7 @@ public function store(Request $request) /** * Display the specified resource. * - * @param Server $server + * @param Server $server * @return Response */ public function show(Server $server) @@ -63,31 +62,55 @@ public function show(Server $server) /** * Show the form for editing the specified resource. * - * @param Server $server + * @param Server $server * @return Response */ - public function edit(Server $server) { + // get all users from the database + $users = User::all(); + return view('admin.servers.edit')->with([ - 'server' => $server + 'server' => $server, + 'users' => $users, ]); } /** * Update the specified resource in storage. * - * @param Request $request - * @param Server $server - * @return Response + * @param Request $request + * @param Server $server */ public function update(Request $request, Server $server) { $request->validate([ - "identifier" => "required|string", + 'identifier' => 'required|string', + 'user_id' => 'required|integer', ]); - $server->update($request->all()); + + if ($request->get('user_id') != $server->user_id) { + // find the user + $user = User::findOrFail($request->get('user_id')); + + // try to update the owner on pterodactyl + try { + $response = Pterodactyl::updateServerOwner($server, $user->pterodactyl_id); + if ($response->getStatusCode() != 200) { + return redirect()->back()->with('error', 'Failed to update server owner on pterodactyl'); + } + + // update the owner on the database + $server->user_id = $user->id; + } catch (Exception $e) { + return redirect()->back()->with('error', 'Internal Server Error'); + } + } + + // update the identifier + $server->identifier = $request->get('identifier'); + $server->save(); return redirect()->route('admin.servers.index')->with('success', 'Server updated!'); } @@ -95,13 +118,14 @@ public function update(Request $request, Server $server) /** * Remove the specified resource from storage. * - * @param Server $server + * @param Server $server * @return RedirectResponse|Response */ public function destroy(Server $server) { try { $server->delete(); + return redirect()->route('admin.servers.index')->with('success', __('Server removed')); } catch (Exception $e) { return redirect()->route('admin.servers.index')->with('error', __('An exception has occurred while trying to remove a resource "') . $e->getMessage() . '"'); @@ -109,13 +133,13 @@ public function destroy(Server $server) } /** - * @param Server $server + * @param Server $server * @return RedirectResponse */ public function toggleSuspended(Server $server) { try { - $server->isSuspended() ? $server->unSuspend() : $server->suspend(); + $server->isSuspended() ? $server->unSuspend() : $server->suspend(); } catch (Exception $exception) { return redirect()->back()->with('error', $exception->getMessage()); } @@ -130,20 +154,20 @@ public function syncServers() $CPIDArray = []; $renameCount = 0; - foreach($CPServers as $CPServer)//go thru all CP servers and make array with IDs as keys. All values are false. - { - if($CPServer->pterodactyl_id) $CPIDArray[$CPServer->pterodactyl_id] = false; + foreach ($CPServers as $CPServer) { //go thru all CP servers and make array with IDs as keys. All values are false. + if ($CPServer->pterodactyl_id) { + $CPIDArray[$CPServer->pterodactyl_id] = false; + } } - foreach($pteroServers as $server)//go thru all ptero servers, if server exists, change value to true in array. - { - if(isset($CPIDArray[$server['attributes']['id']])){ - $CPIDArray[$server['attributes']['id']]=true; + foreach ($pteroServers as $server) { //go thru all ptero servers, if server exists, change value to true in array. + if (isset($CPIDArray[$server['attributes']['id']])) { + $CPIDArray[$server['attributes']['id']] = true; - if(isset($server['attributes']['name'])){//failsafe + if (isset($server['attributes']['name'])) { //failsafe //Check if a server got renamed $savedServer = Server::query()->where('pterodactyl_id', $server['attributes']['id'])->first(); - if($savedServer->name != $server['attributes']['name']){ + if ($savedServer->name != $server['attributes']['name']) { $savedServer->name = $server['attributes']['name']; $savedServer->save(); $renameCount++; @@ -151,28 +175,35 @@ public function syncServers() } } } - $filteredArray = array_filter($CPIDArray, function($v, $k) { return $v == false; }, ARRAY_FILTER_USE_BOTH); //Array of servers, that dont exist on ptero (value == false) + $filteredArray = array_filter($CPIDArray, function ($v, $k) { + return $v == false; + }, ARRAY_FILTER_USE_BOTH); //Array of servers, that dont exist on ptero (value == false) $deleteCount = 0; - foreach($filteredArray as $key => $CPID)//delete servers that dont exist on ptero anymore - { - if(!Pterodactyl::getServerAttributes($key, true)) $deleteCount++; + foreach ($filteredArray as $key => $CPID) { //delete servers that dont exist on ptero anymore + if (!Pterodactyl::getServerAttributes($key, true)) { + $deleteCount++; + } } - return redirect()->back()->with('success', __('Servers synced successfully' . (($renameCount)?(',\n' . __('renamed') . ' ' . $renameCount . ' ' . __('servers')):'') . ((count($filteredArray))?(',\n' . __('deleted') . ' ' . $deleteCount . '/' . count($filteredArray) . ' ' . __('old servers')):''))) . '.'; + return redirect()->back()->with('success', __('Servers synced successfully' . (($renameCount) ? (',\n' . __('renamed') . ' ' . $renameCount . ' ' . __('servers')) : '') . ((count($filteredArray)) ? (',\n' . __('deleted') . ' ' . $deleteCount . '/' . count($filteredArray) . ' ' . __('old servers')) : ''))) . '.'; } /** * @return JsonResponse|mixed + * * @throws Exception */ public function dataTable(Request $request) { $query = Server::with(['user', 'product']); - if ($request->has('product')) $query->where('product_id', '=', $request->input('product')); - if ($request->has('user')) $query->where('user_id', '=', $request->input('user')); + if ($request->has('product')) { + $query->where('product_id', '=', $request->input('product')); + } + if ($request->has('user')) { + $query->where('user_id', '=', $request->input('user')); + } $query->select('servers.*'); - return datatables($query) ->addColumn('user', function (Server $server) { return '' . $server->user->name . ''; @@ -181,12 +212,12 @@ public function dataTable(Request $request) return $server->product->description; }) ->addColumn('actions', function (Server $server) { - $suspendColor = $server->isSuspended() ? "btn-success" : "btn-warning"; - $suspendIcon = $server->isSuspended() ? "fa-play-circle" : "fa-pause-circle"; - $suspendText = $server->isSuspended() ? __("Unsuspend") : __("Suspend"); + $suspendColor = $server->isSuspended() ? 'btn-success' : 'btn-warning'; + $suspendIcon = $server->isSuspended() ? 'fa-play-circle' : 'fa-pause-circle'; + $suspendText = $server->isSuspended() ? __('Unsuspend') : __('Suspend'); return ' - +
' . csrf_field() . ' @@ -194,14 +225,15 @@ public function dataTable(Request $request) ' . csrf_field() . ' - ' . method_field("DELETE") . ' - + ' . method_field('DELETE') . ' +
'; }) ->addColumn('status', function (Server $server) { $labelColor = $server->isSuspended() ? 'text-danger' : 'text-success'; + return ''; }) ->editColumn('created_at', function (Server $server) { @@ -211,7 +243,7 @@ public function dataTable(Request $request) return $server->suspended ? $server->suspended->diffForHumans() : ''; }) ->editColumn('name', function (Server $server) { - return 'pterodactyl_id . '">' . strip_tags($server->name) . ''; + return '' . strip_tags($server->name) . ''; }) ->rawColumns(['user', 'actions', 'status', 'name']) ->make(); diff --git a/app/Http/Controllers/Admin/SettingsController.php b/app/Http/Controllers/Admin/SettingsController.php index e1648eba8..ad1b3a36d 100644 --- a/app/Http/Controllers/Admin/SettingsController.php +++ b/app/Http/Controllers/Admin/SettingsController.php @@ -3,12 +3,11 @@ namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; -use App\Models\Settings; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; -use Illuminate\Http\Request; use Illuminate\Http\Response; +use Qirolab\Theme\Theme; class SettingsController extends Controller { @@ -19,25 +18,32 @@ class SettingsController extends Controller */ public function index() { + + //Get all tabs as laravel view paths $tabs = []; - foreach (glob(resource_path('views/admin/settings/tabs/*.blade.php')) as $filename) { - $tabs[] = 'admin.settings.tabs.' . basename($filename, '.blade.php'); + foreach (glob(Theme::getViewPaths()[0] . '/admin/settings/tabs/*.blade.php') as $filename) { + $tabs[] = 'admin.settings.tabs.'.basename($filename, '.blade.php'); } + //Generate a html list item for each tab based on tabs file basename, set first tab as active $tabListItems = []; foreach ($tabs as $tab) { $tabName = str_replace('admin.settings.tabs.', '', $tab); $tabListItems[] = ''; } + $themes = array_diff(scandir(base_path('themes')), array('..', '.')); + return view('admin.settings.index', [ 'tabs' => $tabs, 'tabListItems' => $tabListItems, + 'themes' => $themes, + 'active_theme' => Theme::active(), ]); } } diff --git a/app/Http/Controllers/Admin/ShopProductController.php b/app/Http/Controllers/Admin/ShopProductController.php index e5930032e..0ff534fd8 100644 --- a/app/Http/Controllers/Admin/ShopProductController.php +++ b/app/Http/Controllers/Admin/ShopProductController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers\Admin; use App\Models\ShopProduct; -use App\Models\Settings; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; @@ -26,12 +25,14 @@ public function index(Request $request) if ( env('APP_ENV') == 'local' || - config("SETTINGS::PAYMENTS:PAYPAL:SECRET") && config("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID") || - config("SETTINGS::PAYMENTS:STRIPE:SECRET") && config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET") && config("SETTINGS::PAYMENTS:STRIPE:METHODS") - ) $isPaymentSetup = true; + config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID') || + config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') && config('SETTINGS::PAYMENTS:STRIPE:METHODS') + ) { + $isPaymentSetup = true; + } return view('admin.store.index', [ - 'isPaymentSetup' => $isPaymentSetup + 'isPaymentSetup' => $isPaymentSetup, ]); } @@ -43,29 +44,29 @@ public function index(Request $request) public function create() { return view('admin.store.create', [ - 'currencyCodes' => config('currency_codes') + 'currencyCodes' => config('currency_codes'), ]); } /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return RedirectResponse */ public function store(Request $request) { $request->validate([ - "disabled" => "nullable", - "type" => "required|string", - "currency_code" => ["required", "string", "max:3", Rule::in(config('currency_codes'))], - "price" => "required|regex:/^\d+(\.\d{1,2})?$/", - "quantity" => "required|numeric", - "description" => "required|string|max:60", - "display" => "required|string|max:60", + 'disabled' => 'nullable', + 'type' => 'required|string', + 'currency_code' => ['required', 'string', 'max:3', Rule::in(config('currency_codes'))], + 'price' => "required|regex:/^\d+(\.\d{1,2})?$/", + 'quantity' => 'required|numeric', + 'description' => 'required|string|max:60', + 'display' => 'required|string|max:60', ]); - $disabled = !is_null($request->input('disabled')); + $disabled = ! is_null($request->input('disabled')); ShopProduct::create(array_merge($request->all(), ['disabled' => $disabled])); return redirect()->route('admin.store.index')->with('success', __('Store item has been created!')); @@ -74,7 +75,7 @@ public function store(Request $request) /** * Display the specified resource. * - * @param ShopProduct $shopProduct + * @param ShopProduct $shopProduct * @return Response */ public function show(ShopProduct $shopProduct) @@ -85,50 +86,50 @@ public function show(ShopProduct $shopProduct) /** * Show the form for editing the specified resource. * - * @param ShopProduct $shopProduct + * @param ShopProduct $shopProduct * @return Application|Factory|View|Response */ public function edit(ShopProduct $shopProduct) { return view('admin.store.edit', [ 'currencyCodes' => config('currency_codes'), - 'shopProduct' => $shopProduct + 'shopProduct' => $shopProduct, ]); } /** * Update the specified resource in storage. * - * @param Request $request - * @param ShopProduct $shopProduct + * @param Request $request + * @param ShopProduct $shopProduct * @return RedirectResponse */ public function update(Request $request, ShopProduct $shopProduct) { $request->validate([ - "disabled" => "nullable", - "type" => "required|string", - "currency_code" => ["required", "string", "max:3", Rule::in(config('currency_codes'))], - "price" => "required|regex:/^\d+(\.\d{1,2})?$/", - "quantity" => "required|numeric|max:100000000", - "description" => "required|string|max:60", - "display" => "required|string|max:60", + 'disabled' => 'nullable', + 'type' => 'required|string', + 'currency_code' => ['required', 'string', 'max:3', Rule::in(config('currency_codes'))], + 'price' => "required|regex:/^\d+(\.\d{1,2})?$/", + 'quantity' => 'required|numeric|max:100000000', + 'description' => 'required|string|max:60', + 'display' => 'required|string|max:60', ]); - $disabled = !is_null($request->input('disabled')); + $disabled = ! is_null($request->input('disabled')); $shopProduct->update(array_merge($request->all(), ['disabled' => $disabled])); return redirect()->route('admin.store.index')->with('success', __('Store item has been updated!')); } /** - * @param Request $request - * @param ShopProduct $shopProduct + * @param Request $request + * @param ShopProduct $shopProduct * @return RedirectResponse */ public function disable(Request $request, ShopProduct $shopProduct) { - $shopProduct->update(['disabled' => !$shopProduct->disabled]); + $shopProduct->update(['disabled' => ! $shopProduct->disabled]); return redirect()->route('admin.store.index')->with('success', __('Product has been updated!')); } @@ -136,16 +137,16 @@ public function disable(Request $request, ShopProduct $shopProduct) /** * Remove the specified resource from storage. * - * @param ShopProduct $shopProduct + * @param ShopProduct $shopProduct * @return RedirectResponse */ public function destroy(ShopProduct $shopProduct) { $shopProduct->delete(); + return redirect()->back()->with('success', __('Store item has been removed!')); } - public function dataTable() { $query = ShopProduct::query(); @@ -153,24 +154,25 @@ public function dataTable() return datatables($query) ->addColumn('actions', function (ShopProduct $shopProduct) { return ' - + -
- ' . csrf_field() . ' - ' . method_field("DELETE") . ' - + + '.csrf_field().' + '.method_field('DELETE').' +
'; }) ->addColumn('disabled', function (ShopProduct $shopProduct) { - $checked = $shopProduct->disabled == false ? "checked" : ""; + $checked = $shopProduct->disabled == false ? 'checked' : ''; + return ' -
- ' . csrf_field() . ' - ' . method_field("PATCH") . ' + + '.csrf_field().' + '.method_field('PATCH').'
- - + +
'; diff --git a/app/Http/Controllers/Admin/UsefulLinkController.php b/app/Http/Controllers/Admin/UsefulLinkController.php index f15e3f11a..ea51c37db 100644 --- a/app/Http/Controllers/Admin/UsefulLinkController.php +++ b/app/Http/Controllers/Admin/UsefulLinkController.php @@ -36,27 +36,27 @@ public function create() /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return RedirectResponse */ public function store(Request $request) { - $request->validate([ - 'icon' => 'required|string', - 'title' => 'required|string|max:60', - 'link' => 'required|url|string|max:191', - 'description' => 'required|string|max:2000', + 'icon' => 'required|string', + 'title' => 'required|string|max:60', + 'link' => 'required|url|string|max:191', + 'description' => 'required|string|max:2000', ]); UsefulLink::create($request->all()); + return redirect()->route('admin.usefullinks.index')->with('success', __('link has been created!')); } /** * Display the specified resource. * - * @param UsefulLink $usefullink + * @param UsefulLink $usefullink * @return Response */ public function show(UsefulLink $usefullink) @@ -67,21 +67,21 @@ public function show(UsefulLink $usefullink) /** * Show the form for editing the specified resource. * - * @param UsefulLink $usefullink + * @param UsefulLink $usefullink * @return Application|Factory|View */ public function edit(UsefulLink $usefullink) { - return view('admin.usefullinks.edit' , [ - 'link' => $usefullink + return view('admin.usefullinks.edit', [ + 'link' => $usefullink, ]); } /** * Update the specified resource in storage. * - * @param Request $request - * @param UsefulLink $usefullink + * @param Request $request + * @param UsefulLink $usefullink * @return RedirectResponse */ public function update(Request $request, UsefulLink $usefullink) @@ -94,18 +94,20 @@ public function update(Request $request, UsefulLink $usefullink) ]); $usefullink->update($request->all()); + return redirect()->route('admin.usefullinks.index')->with('success', __('link has been updated!')); } /** * Remove the specified resource from storage. * - * @param UsefulLink $usefullink + * @param UsefulLink $usefullink * @return Response */ public function destroy(UsefulLink $usefullink) { $usefullink->delete(); + return redirect()->back()->with('success', __('product has been removed!')); } @@ -116,12 +118,12 @@ public function dataTable() return datatables($query) ->addColumn('actions', function (UsefulLink $link) { return ' - + -
- ' . csrf_field() . ' - ' . method_field("DELETE") . ' - + + '.csrf_field().' + '.method_field('DELETE').' +
'; }) @@ -131,7 +133,7 @@ public function dataTable() ->editColumn('icon', function (UsefulLink $link) { return ""; }) - ->rawColumns(['actions' , 'icon']) + ->rawColumns(['actions', 'icon']) ->make(); } } diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index f4f7de1bf..329fe04c7 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -5,11 +5,8 @@ use App\Classes\Pterodactyl; use App\Events\UserUpdateCreditsEvent; use App\Http\Controllers\Controller; -use App\Models\Settings; use App\Models\User; use App\Notifications\DynamicNotification; -use Illuminate\Support\Facades\DB; -use Spatie\QueryBuilder\QueryBuilder; use Exception; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; @@ -19,11 +16,13 @@ use Illuminate\Http\Response; use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Notification; use Illuminate\Support\HtmlString; use Illuminate\Validation\Rule; use Illuminate\Validation\ValidationException; +use Spatie\QueryBuilder\QueryBuilder; class UserController extends Controller { @@ -37,7 +36,7 @@ public function __construct(Pterodactyl $pterodactyl) /** * Display a listing of the resource. * - * @param Request $request + * @param Request $request * @return Application|Factory|View|Response */ public function index(Request $request) @@ -48,23 +47,23 @@ public function index(Request $request) /** * Display the specified resource. * - * @param User $user + * @param User $user * @return Application|Factory|View|Response */ public function show(User $user) { //QUERY ALL REFERRALS A USER HAS //i am not proud of this at all. - $allReferals = array(); - $referrals = DB::table("user_referrals")->where("referral_id","=",$user->id)->get(); - foreach($referrals as $referral){ - array_push($allReferals, $allReferals["id"] = User::query()->findOrFail($referral->registered_user_id)); - } - array_pop($allReferals); + $allReferals = []; + $referrals = DB::table('user_referrals')->where('referral_id', '=', $user->id)->get(); + foreach ($referrals as $referral) { + array_push($allReferals, $allReferals['id'] = User::query()->findOrFail($referral->registered_user_id)); + } + array_pop($allReferals); return view('admin.users.show')->with([ 'user' => $user, - 'referrals' => $allReferals + 'referrals' => $allReferals, ]); } @@ -92,50 +91,51 @@ public function json(Request $request) return $item; }); } + /** * Show the form for editing the specified resource. * - * @param User $user + * @param User $user * @return Application|Factory|View|Response */ public function edit(User $user) { return view('admin.users.edit')->with([ - 'user' => $user + 'user' => $user, ]); } /** * Update the specified resource in storage. * - * @param Request $request - * @param User $user + * @param Request $request + * @param User $user * @return RedirectResponse + * * @throws Exception */ public function update(Request $request, User $user) { - $request->validate([ - "name" => "required|string|min:4|max:30", - "pterodactyl_id" => "required|numeric|unique:users,pterodactyl_id,{$user->id}", - "email" => "required|string|email", - "credits" => "required|numeric|min:0|max:99999999", - "server_limit" => "required|numeric|min:0|max:1000000", - "role" => Rule::in(['admin', 'moderator', 'client', 'member']), - "referral_code" => "required|string|min:2|max:32|unique:users,referral_code,{$user->id}", + 'name' => 'required|string|min:4|max:30', + 'pterodactyl_id' => "required|numeric|unique:users,pterodactyl_id,{$user->id}", + 'email' => 'required|string|email', + 'credits' => 'required|numeric|min:0|max:99999999', + 'server_limit' => 'required|numeric|min:0|max:1000000', + 'role' => Rule::in(['admin', 'moderator', 'client', 'member']), + 'referral_code' => "required|string|min:2|max:32|unique:users,referral_code,{$user->id}", ]); if (isset($this->pterodactyl->getUser($request->input('pterodactyl_id'))['errors'])) { throw ValidationException::withMessages([ - 'pterodactyl_id' => [__("User does not exists on pterodactyl's panel")] + 'pterodactyl_id' => [__("User does not exists on pterodactyl's panel")], ]); } - if (!is_null($request->input('new_password'))) { + if (! is_null($request->input('new_password'))) { $request->validate([ 'new_password' => 'required|string|min:8', - 'new_password_confirmation' => 'required|same:new_password' + 'new_password_confirmation' => 'required|same:new_password', ]); $user->update([ @@ -152,53 +152,58 @@ public function update(Request $request, User $user) /** * Remove the specified resource from storage. * - * @param User $user + * @param User $user * @return RedirectResponse */ public function destroy(User $user) { $user->delete(); + return redirect()->back()->with('success', __('user has been removed!')); } + /** * Verifys the users email * - * @param User $user + * @param User $user * @return RedirectResponse */ public function verifyEmail(Request $request, User $user) { $user->verifyEmail(); + return redirect()->back()->with('success', __('Email has been verified!')); } /** - * @param Request $request - * @param User $user + * @param Request $request + * @param User $user * @return RedirectResponse */ public function loginAs(Request $request, User $user) { $request->session()->put('previousUser', Auth::user()->id); Auth::login($user); + return redirect()->route('home'); } /** - * @param Request $request + * @param Request $request * @return RedirectResponse */ public function logBackIn(Request $request) { Auth::loginUsingId($request->session()->get('previousUser'), true); $request->session()->remove('previousUser'); + return redirect()->route('admin.users.index'); } /** * Show the form for seding notifications to the specified resource. * - * @param User $user + * @param User $user * @return Application|Factory|View|Response */ public function notifications(User $user) @@ -209,50 +214,52 @@ public function notifications(User $user) /** * Notify the specified resource. * - * @param Request $request - * @param User $user + * @param Request $request + * @param User $user * @return RedirectResponse + * * @throws Exception */ public function notify(Request $request) { $data = $request->validate([ - "via" => "required|min:1|array", - "via.*" => "required|string|in:mail,database", - "all" => "required_without:users|boolean", - "users" => "required_without:all|min:1|array", - "users.*" => "exists:users,id", - "title" => "required|string|min:1", - "content" => "required|string|min:1" + 'via' => 'required|min:1|array', + 'via.*' => 'required|string|in:mail,database', + 'all' => 'required_without:users|boolean', + 'users' => 'required_without:all|min:1|array', + 'users.*' => 'exists:users,id', + 'title' => 'required|string|min:1', + 'content' => 'required|string|min:1', ]); $mail = null; $database = null; - if (in_array('database', $data["via"])) { + if (in_array('database', $data['via'])) { $database = [ - "title" => $data["title"], - "content" => $data["content"] + 'title' => $data['title'], + 'content' => $data['content'], ]; } - if (in_array('mail', $data["via"])) { + if (in_array('mail', $data['via'])) { $mail = (new MailMessage) - ->subject($data["title"]) - ->line(new HtmlString($data["content"])); + ->subject($data['title']) + ->line(new HtmlString($data['content'])); } - $all = $data["all"] ?? false; - $users = $all ? User::all() : User::whereIn("id", $data["users"])->get(); - Notification::send($users, new DynamicNotification($data["via"], $database, $mail)); + $all = $data['all'] ?? false; + $users = $all ? User::all() : User::whereIn('id', $data['users'])->get(); + Notification::send($users, new DynamicNotification($data['via'], $database, $mail)); + return redirect()->route('admin.users.notifications')->with('success', __('Notification sent!')); } /** - * @param User $user + * @param User $user * @return RedirectResponse */ public function toggleSuspended(User $user) { try { - !$user->isSuspended() ? $user->suspend() : $user->unSuspend(); + ! $user->isSuspended() ? $user->suspend() : $user->unSuspend(); } catch (Exception $exception) { return redirect()->back()->with('error', $exception->getMessage()); } @@ -261,7 +268,6 @@ public function toggleSuspended(User $user) } /** - * * @throws Exception */ public function dataTable() @@ -270,10 +276,10 @@ public function dataTable() return datatables($query) ->addColumn('avatar', function (User $user) { - return ''; + return ''; }) ->addColumn('credits', function (User $user) { - return ' ' . $user->credits(); + return ' '.$user->credits(); }) ->addColumn('verified', function (User $user) { return $user->getVerifiedStatus(); @@ -282,31 +288,33 @@ public function dataTable() return $user->servers->count(); }) ->addColumn('referrals', function (User $user) { - return DB::table('user_referrals')->where("referral_id","=",$user->id)->count(); + return DB::table('user_referrals')->where('referral_id', '=', $user->id)->count(); }) ->addColumn('discordId', function (User $user) { return $user->discordUser ? $user->discordUser->id : ''; }) ->addColumn('last_seen', function (User $user) { - return $user->last_seen ? $user->last_seen->diffForHumans() : ''; + return ['display' => $user->last_seen ? $user->last_seen->diffForHumans() : '', + 'raw' => $user->last_seen ? strtotime($user->last_seen) : '', ]; }) ->addColumn('actions', function (User $user) { - $suspendColor = $user->isSuspended() ? "btn-success" : "btn-warning"; - $suspendIcon = $user->isSuspended() ? "fa-play-circle" : "fa-pause-circle"; - $suspendText = $user->isSuspended() ? __("Unsuspend") : __("Suspend"); + $suspendColor = $user->isSuspended() ? 'btn-success' : 'btn-warning'; + $suspendIcon = $user->isSuspended() ? 'fa-play-circle' : 'fa-pause-circle'; + $suspendText = $user->isSuspended() ? __('Unsuspend') : __('Suspend'); + return ' - - - - -
- ' . csrf_field() . ' - + + + + + + '.csrf_field().' +
-
- ' . csrf_field() . ' - ' . method_field("DELETE") . ' - + + '.csrf_field().' + '.method_field('DELETE').' +
'; }) @@ -326,14 +334,14 @@ public function dataTable() break; } - return '' . $user->role . ''; + return ''.$user->role.''; }) ->editColumn('name', function (User $user) { - return 'pterodactyl_id . '">' . strip_tags($user->name) . ''; + return ''.strip_tags($user->name).''; }) - ->orderColumn('last_seen', function ($query) { + /*->orderColumn('last_seen', function ($query) { $query->orderBy('last_seen', "desc"); - }) + })*/ ->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'referrals', 'actions', 'last_seen']) ->make(true); } diff --git a/app/Http/Controllers/Admin/VoucherController.php b/app/Http/Controllers/Admin/VoucherController.php index 51cb50004..ce8bcf5db 100644 --- a/app/Http/Controllers/Admin/VoucherController.php +++ b/app/Http/Controllers/Admin/VoucherController.php @@ -40,16 +40,16 @@ public function create() /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return RedirectResponse */ public function store(Request $request) { $request->validate([ - 'memo' => 'nullable|string|max:191', - 'code' => 'required|string|alpha_dash|max:36|min:4|unique:vouchers', - 'uses' => 'required|numeric|max:2147483647|min:1', - 'credits' => 'required|numeric|between:0,99999999', + 'memo' => 'nullable|string|max:191', + 'code' => 'required|string|alpha_dash|max:36|min:4|unique:vouchers', + 'uses' => 'required|numeric|max:2147483647|min:1', + 'credits' => 'required|numeric|between:0,99999999', 'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years', ]); @@ -61,7 +61,7 @@ public function store(Request $request) /** * Display the specified resource. * - * @param Voucher $voucher + * @param Voucher $voucher * @return Response */ public function show(Voucher $voucher) @@ -72,30 +72,30 @@ public function show(Voucher $voucher) /** * Show the form for editing the specified resource. * - * @param Voucher $voucher + * @param Voucher $voucher * @return Application|Factory|View */ public function edit(Voucher $voucher) { return view('admin.vouchers.edit', [ - 'voucher' => $voucher + 'voucher' => $voucher, ]); } /** * Update the specified resource in storage. * - * @param Request $request - * @param Voucher $voucher + * @param Request $request + * @param Voucher $voucher * @return RedirectResponse */ public function update(Request $request, Voucher $voucher) { $request->validate([ - 'memo' => 'nullable|string|max:191', - 'code' => "required|string|alpha_dash|max:36|min:4|unique:vouchers,code,{$voucher->id}", - 'uses' => 'required|numeric|max:2147483647|min:1', - 'credits' => 'required|numeric|between:0,99999999', + 'memo' => 'nullable|string|max:191', + 'code' => "required|string|alpha_dash|max:36|min:4|unique:vouchers,code,{$voucher->id}", + 'uses' => 'required|numeric|max:2147483647|min:1', + 'credits' => 'required|numeric|between:0,99999999', 'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years', ]); @@ -107,61 +107,71 @@ public function update(Request $request, Voucher $voucher) /** * Remove the specified resource from storage. * - * @param Voucher $voucher + * @param Voucher $voucher * @return RedirectResponse */ public function destroy(Voucher $voucher) { $voucher->delete(); + return redirect()->back()->with('success', __('voucher has been removed!')); } public function users(Voucher $voucher) { return view('admin.vouchers.users', [ - 'voucher' => $voucher + 'voucher' => $voucher, ]); } /** - * @param Request $request + * @param Request $request * @return JsonResponse + * * @throws ValidationException */ public function redeem(Request $request) { - #general validations + //general validations $request->validate([ - 'code' => 'required|exists:vouchers,code' + 'code' => 'required|exists:vouchers,code', ]); - #get voucher by code + //get voucher by code $voucher = Voucher::where('code', '=', $request->input('code'))->firstOrFail(); - #extra validations - if ($voucher->getStatus() == 'USES_LIMIT_REACHED') throw ValidationException::withMessages([ - 'code' => __('This voucher has reached the maximum amount of uses') - ]); - - if ($voucher->getStatus() == 'EXPIRED') throw ValidationException::withMessages([ - 'code' => __('This voucher has expired') - ]); - - if (!$request->user()->vouchers()->where('id', '=', $voucher->id)->get()->isEmpty()) throw ValidationException::withMessages([ - 'code' => __('You already redeemed this voucher code') - ]); - - if ($request->user()->credits + $voucher->credits >= 99999999) throw ValidationException::withMessages([ - 'code' => "You can't redeem this voucher because you would exceed the limit of " . CREDITS_DISPLAY_NAME - ]); - - #redeem voucher + //extra validations + if ($voucher->getStatus() == 'USES_LIMIT_REACHED') { + throw ValidationException::withMessages([ + 'code' => __('This voucher has reached the maximum amount of uses'), + ]); + } + + if ($voucher->getStatus() == 'EXPIRED') { + throw ValidationException::withMessages([ + 'code' => __('This voucher has expired'), + ]); + } + + if (! $request->user()->vouchers()->where('id', '=', $voucher->id)->get()->isEmpty()) { + throw ValidationException::withMessages([ + 'code' => __('You already redeemed this voucher code'), + ]); + } + + if ($request->user()->credits + $voucher->credits >= 99999999) { + throw ValidationException::withMessages([ + 'code' => "You can't redeem this voucher because you would exceed the limit of ".CREDITS_DISPLAY_NAME, + ]); + } + + //redeem voucher $voucher->redeem($request->user()); event(new UserUpdateCreditsEvent($request->user())); return response()->json([ - 'success' => "{$voucher->credits} " . CREDITS_DISPLAY_NAME ." ". __("have been added to your balance!") + 'success' => "{$voucher->credits} ".CREDITS_DISPLAY_NAME.' '.__('have been added to your balance!'), ]); } @@ -171,10 +181,10 @@ public function usersDataTable(Voucher $voucher) return datatables($users) ->editColumn('name', function (User $user) { - return '' . $user->name . ''; + return ''.$user->name.''; }) ->addColumn('credits', function (User $user) { - return ' ' . $user->credits(); + return ' '.$user->credits(); }) ->addColumn('last_seen', function (User $user) { return $user->last_seen ? $user->last_seen->diffForHumans() : ''; @@ -182,6 +192,7 @@ public function usersDataTable(Voucher $voucher) ->rawColumns(['name', 'credits', 'last_seen']) ->make(); } + public function dataTable() { $query = Voucher::query(); @@ -189,20 +200,23 @@ public function dataTable() return datatables($query) ->addColumn('actions', function (Voucher $voucher) { return ' - - + + -
- ' . csrf_field() . ' - ' . method_field("DELETE") . ' - + + '.csrf_field().' + '.method_field('DELETE').' +
'; }) ->addColumn('status', function (Voucher $voucher) { $color = 'success'; - if ($voucher->getStatus() != __('VALID')) $color = 'danger'; - return '' . $voucher->getStatus() . ''; + if ($voucher->getStatus() != __('VALID')) { + $color = 'danger'; + } + + return ''.$voucher->getStatus().''; }) ->editColumn('uses', function (Voucher $voucher) { return "{$voucher->used} / {$voucher->uses}"; @@ -211,7 +225,10 @@ public function dataTable() return number_format($voucher->credits, 2, '.', ''); }) ->editColumn('expires_at', function (Voucher $voucher) { - if (!$voucher->expires_at) return ""; + if (! $voucher->expires_at) { + return ''; + } + return $voucher->expires_at ? $voucher->expires_at->diffForHumans() : ''; }) ->editColumn('code', function (Voucher $voucher) { diff --git a/app/Http/Controllers/Api/NotificationController.php b/app/Http/Controllers/Api/NotificationController.php index 9fe61c798..9ccc47af5 100644 --- a/app/Http/Controllers/Api/NotificationController.php +++ b/app/Http/Controllers/Api/NotificationController.php @@ -19,8 +19,9 @@ class NotificationController extends Controller { /** * Display all notifications of an user. - * @param Request $request - * @param int $userId + * + * @param Request $request + * @param int $userId * @return Response */ public function index(Request $request, int $userId) @@ -28,14 +29,14 @@ public function index(Request $request, int $userId) $discordUser = DiscordUser::find($userId); $user = $discordUser ? $discordUser->user : User::findOrFail($userId); - return $user->notifications()->paginate($request->query("per_page", 50)); + return $user->notifications()->paginate($request->query('per_page', 50)); } /** * Display a specific notification * - * @param int $userId - * @param int $notificationId + * @param int $userId + * @param int $notificationId * @return JsonResponse */ public function view(int $userId, $notificationId) @@ -43,10 +44,10 @@ public function view(int $userId, $notificationId) $discordUser = DiscordUser::find($userId); $user = $discordUser ? $discordUser->user : User::findOrFail($userId); - $notification = $user->notifications()->where("id", $notificationId)->get()->first(); + $notification = $user->notifications()->where('id', $notificationId)->get()->first(); - if (!$notification) { - return response()->json(["message" => "Notification not found."], 404); + if (! $notification) { + return response()->json(['message' => 'Notification not found.'], 404); } return $notification; @@ -55,42 +56,43 @@ public function view(int $userId, $notificationId) /** * Send a notification to an user. * - * @param Request $request + * @param Request $request * @return JsonResponse + * * @throws ValidationException */ public function send(Request $request) { $data = $request->validate([ - "via" => ["required", new Delimited("in:mail,database")], - "all" => "required_without:users|boolean", - "users" => ["required_without:all"], - "title" => "required|string|min:1", - "content" => "required|string|min:1" + 'via' => ['required', new Delimited('in:mail,database')], + 'all' => 'required_without:users|boolean', + 'users' => ['required_without:all'], + 'title' => 'required|string|min:1', + 'content' => 'required|string|min:1', ]); - $via = explode(",", $data["via"]); + $via = explode(',', $data['via']); $mail = null; $database = null; - if (in_array("database", $via)) { + if (in_array('database', $via)) { $database = [ - "title" => $data["title"], - "content" => $data["content"] + 'title' => $data['title'], + 'content' => $data['content'], ]; } - if (in_array("mail", $via)) { + if (in_array('mail', $via)) { $mail = (new MailMessage) - ->subject($data["title"]) - ->line(new HtmlString($data["content"])); + ->subject($data['title']) + ->line(new HtmlString($data['content'])); } - $all = $data["all"] ?? false; + $all = $data['all'] ?? false; if ($all) { $users = User::all(); } else { - $userIds = explode(",", $data["users"]); + $userIds = explode(',', $data['users']); $users = User::query() - ->whereIn("id", $userIds) + ->whereIn('id', $userIds) ->orWhereHas('discordUser', function (Builder $builder) use ($userIds) { $builder->whereIn('id', $userIds); }) @@ -104,13 +106,14 @@ public function send(Request $request) } Notification::send($users, new DynamicNotification($via, $database, $mail)); - return response()->json(["message" => "Notification successfully sent.", 'user_count' => $users->count()]); + + return response()->json(['message' => 'Notification successfully sent.', 'user_count' => $users->count()]); } /** * Delete all notifications from an user * - * @param int $userId + * @param int $userId * @return JsonResponse */ public function delete(int $userId) @@ -120,15 +123,14 @@ public function delete(int $userId) $count = $user->notifications()->delete(); - return response()->json(["message" => "All notifications have been successfully deleted.", "count" => $count]); + return response()->json(['message' => 'All notifications have been successfully deleted.', 'count' => $count]); } - /** * Delete a specific notification * - * @param int $userId - * @param int $notificationId + * @param int $userId + * @param int $notificationId * @return JsonResponse */ public function deleteOne(int $userId, $notificationid) @@ -136,13 +138,14 @@ public function deleteOne(int $userId, $notificationid) $discordUser = DiscordUser::find($userId); $user = $discordUser ? $discordUser->user : User::findOrFail($userId); - $notification = $user->notifications()->where("id", $notificationid)->get()->first(); + $notification = $user->notifications()->where('id', $notificationid)->get()->first(); - if (!$notification) { - return response()->json(["message" => "Notification not found."], 404); + if (! $notification) { + return response()->json(['message' => 'Notification not found.'], 404); } $notification->delete(); + return response()->json($notification); } } diff --git a/app/Http/Controllers/Api/ServerController.php b/app/Http/Controllers/Api/ServerController.php index 1b9468c01..bd591ced2 100644 --- a/app/Http/Controllers/Api/ServerController.php +++ b/app/Http/Controllers/Api/ServerController.php @@ -15,12 +15,13 @@ class ServerController extends Controller { public const ALLOWED_INCLUDES = ['product', 'user']; + public const ALLOWED_FILTERS = ['name', 'suspended', 'identifier', 'pterodactyl_id', 'user_id', 'product_id']; /** * Display a listing of the resource. * - * @param Request $request + * @param Request $request * @return LengthAwarePaginator */ public function index(Request $request) @@ -35,8 +36,7 @@ public function index(Request $request) /** * Display the specified resource. * - * @param Server $server - * + * @param Server $server * @return Server|Collection|Model */ public function show(Server $server) @@ -51,19 +51,20 @@ public function show(Server $server) /** * Remove the specified resource from storage. * - * @param Server $server + * @param Server $server * @return Server */ public function destroy(Server $server) { $server->delete(); + return $server; } - /** * suspend server - * @param Server $server + * + * @param Server $server * @return Server|JsonResponse */ public function suspend(Server $server) @@ -77,10 +78,10 @@ public function suspend(Server $server) return $server->load('product'); } - /** * unsuspend server - * @param Server $server + * + * @param Server $server * @return Server|JsonResponse */ public function unSuspend(Server $server) diff --git a/app/Http/Controllers/Api/UserController.php b/app/Http/Controllers/Api/UserController.php index 3f3084050..dab72dbad 100644 --- a/app/Http/Controllers/Api/UserController.php +++ b/app/Http/Controllers/Api/UserController.php @@ -6,7 +6,6 @@ use App\Events\UserUpdateCreditsEvent; use App\Http\Controllers\Controller; use App\Models\DiscordUser; -use App\Models\Settings; use App\Models\User; use App\Notifications\ReferralNotification; use Carbon\Carbon; @@ -29,12 +28,13 @@ class UserController extends Controller { const ALLOWED_INCLUDES = ['servers', 'notifications', 'payments', 'vouchers', 'discordUser']; + const ALLOWED_FILTERS = ['name', 'server_limit', 'email', 'pterodactyl_id', 'role', 'suspended']; /** * Display a listing of the resource. * - * @param Request $request + * @param Request $request * @return LengthAwarePaginator */ public function index(Request $request) @@ -46,12 +46,10 @@ public function index(Request $request) return $query->paginate($request->input('per_page') ?? 50); } - /** * Display the specified resource. * - * @param int $id - * + * @param int $id * @return User|Builder|Collection|Model */ public function show(int $id) @@ -70,12 +68,11 @@ public function show(int $id) return $query->firstOrFail(); } - /** * Update the specified resource in storage. * - * @param Request $request - * @param int $id + * @param Request $request + * @param int $id * @return User */ public function update(Request $request, int $id) @@ -84,28 +81,28 @@ public function update(Request $request, int $id) $user = $discordUser ? $discordUser->user : User::findOrFail($id); $request->validate([ - "name" => "sometimes|string|min:4|max:30", - "email" => "sometimes|string|email", - "credits" => "sometimes|numeric|min:0|max:1000000", - "server_limit" => "sometimes|numeric|min:0|max:1000000", - "role" => ['sometimes', Rule::in(['admin', 'moderator', 'client', 'member'])], + 'name' => 'sometimes|string|min:4|max:30', + 'email' => 'sometimes|string|email', + 'credits' => 'sometimes|numeric|min:0|max:1000000', + 'server_limit' => 'sometimes|numeric|min:0|max:1000000', + 'role' => ['sometimes', Rule::in(['admin', 'moderator', 'client', 'member'])], ]); event(new UserUpdateCreditsEvent($user)); //Update Users Password on Pterodactyl //Username,Mail,First and Lastname are required aswell - $response = Pterodactyl::client()->patch('/application/users/' . $user->pterodactyl_id, [ - "username" => $request->name, - "first_name" => $request->name, - "last_name" => $request->name, - "email" => $request->email, + $response = Pterodactyl::client()->patch('/application/users/'.$user->pterodactyl_id, [ + 'username' => $request->name, + 'first_name' => $request->name, + 'last_name' => $request->name, + 'email' => $request->email, ]); if ($response->failed()) { throw ValidationException::withMessages([ 'pterodactyl_error_message' => $response->toException()->getMessage(), - 'pterodactyl_error_status' => $response->toException()->getCode() + 'pterodactyl_error_status' => $response->toException()->getCode(), ]); } $user->update($request->all()); @@ -116,9 +113,10 @@ public function update(Request $request, int $id) /** * increments the users credits or/and server_limit * - * @param Request $request - * @param int $id + * @param Request $request + * @param int $id * @return User + * * @throws ValidationException */ public function increment(Request $request, int $id) @@ -127,22 +125,26 @@ public function increment(Request $request, int $id) $user = $discordUser ? $discordUser->user : User::findOrFail($id); $request->validate([ - "credits" => "sometimes|numeric|min:0|max:1000000", - "server_limit" => "sometimes|numeric|min:0|max:1000000", + 'credits' => 'sometimes|numeric|min:0|max:1000000', + 'server_limit' => 'sometimes|numeric|min:0|max:1000000', ]); if ($request->credits) { - if ($user->credits + $request->credits >= 99999999) throw ValidationException::withMessages([ - 'credits' => "You can't add this amount of credits because you would exceed the credit limit" - ]); + if ($user->credits + $request->credits >= 99999999) { + throw ValidationException::withMessages([ + 'credits' => "You can't add this amount of credits because you would exceed the credit limit", + ]); + } event(new UserUpdateCreditsEvent($user)); $user->increment('credits', $request->credits); } if ($request->server_limit) { - if ($user->server_limit + $request->server_limit >= 2147483647) throw ValidationException::withMessages([ - 'server_limit' => "You cannot add this amount of servers because it would exceed the server limit." - ]); + if ($user->server_limit + $request->server_limit >= 2147483647) { + throw ValidationException::withMessages([ + 'server_limit' => 'You cannot add this amount of servers because it would exceed the server limit.', + ]); + } $user->increment('server_limit', $request->server_limit); } @@ -152,9 +154,10 @@ public function increment(Request $request, int $id) /** * decrements the users credits or/and server_limit * - * @param Request $request - * @param int $id + * @param Request $request + * @param int $id * @return User + * * @throws ValidationException */ public function decrement(Request $request, int $id) @@ -163,21 +166,25 @@ public function decrement(Request $request, int $id) $user = $discordUser ? $discordUser->user : User::findOrFail($id); $request->validate([ - "credits" => "sometimes|numeric|min:0|max:1000000", - "server_limit" => "sometimes|numeric|min:0|max:1000000", + 'credits' => 'sometimes|numeric|min:0|max:1000000', + 'server_limit' => 'sometimes|numeric|min:0|max:1000000', ]); if ($request->credits) { - if ($user->credits - $request->credits < 0) throw ValidationException::withMessages([ - 'credits' => "You can't remove this amount of credits because you would exceed the minimum credit limit" - ]); + if ($user->credits - $request->credits < 0) { + throw ValidationException::withMessages([ + 'credits' => "You can't remove this amount of credits because you would exceed the minimum credit limit", + ]); + } $user->decrement('credits', $request->credits); } if ($request->server_limit) { - if ($user->server_limit - $request->server_limit < 0) throw ValidationException::withMessages([ - 'server_limit' => "You cannot remove this amount of servers because it would exceed the minimum server." - ]); + if ($user->server_limit - $request->server_limit < 0) { + throw ValidationException::withMessages([ + 'server_limit' => 'You cannot remove this amount of servers because it would exceed the minimum server.', + ]); + } $user->decrement('server_limit', $request->server_limit); } @@ -187,9 +194,10 @@ public function decrement(Request $request, int $id) /** * Suspends the user * - * @param Request $request - * @param int $id + * @param Request $request + * @param int $id * @return bool + * * @throws ValidationException */ public function suspend(Request $request, int $id) @@ -210,9 +218,10 @@ public function suspend(Request $request, int $id) /** * Unsuspend the user * - * @param Request $request - * @param int $id + * @param Request $request + * @param int $id * @return bool + * * @throws ValidationException */ public function unsuspend(Request $request, int $id) @@ -220,9 +229,9 @@ public function unsuspend(Request $request, int $id) $discordUser = DiscordUser::find($id); $user = $discordUser ? $discordUser->user : User::findOrFail($id); - if (!$user->isSuspended()) { + if (! $user->isSuspended()) { throw ValidationException::withMessages([ - 'error' => "You cannot unsuspend an User who is not suspended." + 'error' => 'You cannot unsuspend an User who is not suspended.', ]); } @@ -230,17 +239,22 @@ public function unsuspend(Request $request, int $id) return $user; } + /** * Create a unique Referral Code for User + * * @return string */ - protected function createReferralCode(){ + protected function createReferralCode() + { $referralcode = STR::random(8); if (User::where('referral_code', '=', $referralcode)->exists()) { $this->createReferralCode(); } + return $referralcode; } + /** * @throws ValidationException */ @@ -251,13 +265,13 @@ public function store(Request $request) 'email' => ['required', 'string', 'email', 'max:64', 'unique:users'], 'password' => ['required', 'string', 'min:8', 'max:191'], ]); - + // Prevent the creation of new users via API if this is enabled. - if (!config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) { + if (! config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', 'true')) { throw ValidationException::withMessages([ - 'error' => "The creation of new users has been blocked by the system administrator." + 'error' => 'The creation of new users has been blocked by the system administrator.', ]); - } + } $user = User::create([ 'name' => $request->input('name'), @@ -269,45 +283,44 @@ public function store(Request $request) ]); $response = Pterodactyl::client()->post('/application/users', [ - "external_id" => App::environment('local') ? Str::random(16) : (string)$user->id, - "username" => $user->name, - "email" => $user->email, - "first_name" => $user->name, - "last_name" => $user->name, - "password" => $request->input('password'), - "root_admin" => false, - "language" => "en" + 'external_id' => App::environment('local') ? Str::random(16) : (string) $user->id, + 'username' => $user->name, + 'email' => $user->email, + 'first_name' => $user->name, + 'last_name' => $user->name, + 'password' => $request->input('password'), + 'root_admin' => false, + 'language' => 'en', ]); if ($response->failed()) { $user->delete(); throw ValidationException::withMessages([ 'pterodactyl_error_message' => $response->toException()->getMessage(), - 'pterodactyl_error_status' => $response->toException()->getCode() + 'pterodactyl_error_status' => $response->toException()->getCode(), ]); } $user->update([ - 'pterodactyl_id' => $response->json()['attributes']['id'] + 'pterodactyl_id' => $response->json()['attributes']['id'], ]); //INCREMENT REFERRAL-USER CREDITS - if(!empty($request->input("referral_code"))){ - $ref_code = $request->input("referral_code"); + if (! empty($request->input('referral_code'))) { + $ref_code = $request->input('referral_code'); $new_user = $user->id; - if($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) { - if(config("SETTINGS::REFERRAL:MODE") == "register" || config("SETTINGS::REFERRAL:MODE") == "both") { - $ref_user->increment('credits', config("SETTINGS::REFERRAL::REWARD")); + if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) { + if (config('SETTINGS::REFERRAL:MODE') == 'register' || config('SETTINGS::REFERRAL:MODE') == 'both') { + $ref_user->increment('credits', config('SETTINGS::REFERRAL::REWARD')); $ref_user->notify(new ReferralNotification($ref_user->id, $new_user)); } //INSERT INTO USER_REFERRALS TABLE DB::table('user_referrals')->insert([ 'referral_id' => $ref_user->id, 'registered_user_id' => $user->id, - 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), ]); } - } $user->sendEmailVerificationNotification(); @@ -317,7 +330,7 @@ public function store(Request $request) /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id * @return Application|Response|ResponseFactory */ public function destroy(int $id) @@ -326,6 +339,7 @@ public function destroy(int $id) $user = $discordUser ? $discordUser->user : User::findOrFail($id); $user->delete(); + return response($user, 200); } } diff --git a/app/Http/Controllers/Api/VoucherController.php b/app/Http/Controllers/Api/VoucherController.php index a094fe1d5..6b3b8d3c9 100644 --- a/app/Http/Controllers/Api/VoucherController.php +++ b/app/Http/Controllers/Api/VoucherController.php @@ -15,6 +15,7 @@ class VoucherController extends Controller { const ALLOWED_INCLUDES = ['users']; + const ALLOWED_FILTERS = ['code', 'memo', 'credits', 'uses']; /** @@ -44,7 +45,7 @@ public function create() /** * Store a newly created resource in storage. * - * @param Request $request + * @param Request $request * @return Response */ public function store(Request $request) @@ -54,7 +55,7 @@ public function store(Request $request) 'code' => 'required|string|alpha_dash|max:36|min:4|unique:vouchers', 'uses' => 'required|numeric|max:2147483647|min:1', 'credits' => 'required|numeric|between:0,99999999', - 'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years' + 'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years', ]); return Voucher::create($request->all()); @@ -63,8 +64,7 @@ public function store(Request $request) /** * Display the specified resource. * - * @param int $id - * + * @param int $id * @return Voucher|Collection|Model */ public function show(int $id) @@ -79,7 +79,7 @@ public function show(int $id) /** * Show the form for editing the specified resource. * - * @param int $id + * @param int $id * @return Response */ public function edit($id) @@ -90,8 +90,8 @@ public function edit($id) /** * Update the specified resource in storage. * - * @param Request $request - * @param int $id + * @param Request $request + * @param int $id * @return Response */ public function update(Request $request, int $id) @@ -103,7 +103,7 @@ public function update(Request $request, int $id) 'code' => "required|string|alpha_dash|max:36|min:4|unique:vouchers,code,{$voucher->id}", 'uses' => 'required|numeric|max:2147483647|min:1', 'credits' => 'required|numeric|between:0,99999999', - 'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years' + 'expires_at' => 'nullable|multiple_date_format:d-m-Y H:i:s,d-m-Y|after:now|before:10 years', ]); $voucher->update($request->all()); @@ -114,21 +114,22 @@ public function update(Request $request, int $id) /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id * @return Response */ public function destroy(int $id) { $voucher = Voucher::findOrFail($id); $voucher->delete(); + return $voucher; } - /** * get linked users - * @param Request $request - * @param Voucher $voucher + * + * @param Request $request + * @param Voucher $voucher * @return LengthAwarePaginator */ public function users(Request $request, Voucher $voucher) @@ -138,7 +139,7 @@ public function users(Request $request, Voucher $voucher) 'nullable', 'string', Rule::in(['discorduser']), - ] + ], ]); if ($request->input('include') == 'discorduser') { diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 465c39ccf..bd9df2d89 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -4,6 +4,7 @@ use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\SendsPasswordResetEmails; +use Illuminate\Http\Request; class ForgotPasswordController extends Controller { @@ -19,4 +20,27 @@ class ForgotPasswordController extends Controller */ use SendsPasswordResetEmails; + + /** + * Create a new controller instance. + * + * @return void + */ + public function __construct() + { + $this->middleware('guest'); + } + + protected function validateEmail(Request $request) + { + $this->validate($request, [ + 'email' => ['required', 'string', 'email', 'max:255'], + ]); + + if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') { + $this->validate($request, [ + 'g-recaptcha-response' => 'required|recaptcha', + ]); + } + } } diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 62089d7e9..848db48a3 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -3,12 +3,10 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; -use App\Models\User; use App\Providers\RouteServiceProvider; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Facades\Log; class LoginController extends Controller { @@ -42,20 +40,30 @@ public function __construct() $this->middleware('guest')->except('logout'); } - public function login(Request $request) + /** + * Get the login username to be used by the controller. + * + * @return string + */ + public function username() { + $login = request()->input('email'); + $field = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'name'; + request()->merge([$field => $login]); + return $field; + } + public function login(Request $request) + { $validationRules = [ - $this->username() => 'required|string', - 'password' => 'required|string', + $this->username() => 'required|string', + 'password' => 'required|string', ]; if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') { $validationRules['g-recaptcha-response'] = ['required', 'recaptcha']; } $request->validate($validationRules); - - // If the class is using the ThrottlesLogins trait, we can automatically throttle // the login attempts for this application. We'll key this by the username and // the IP address of the client making these requests into this application. @@ -72,6 +80,7 @@ public function login(Request $request) $user = Auth::user(); $user->last_seen = now(); $user->save(); + return $this->sendLoginResponse($request); } diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 5a8059879..465535bfd 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -4,17 +4,14 @@ use App\Classes\Pterodactyl; use App\Http\Controllers\Controller; -use App\Models\Settings; use App\Models\User; use App\Notifications\ReferralNotification; use App\Providers\RouteServiceProvider; use Carbon\Carbon; use Illuminate\Foundation\Auth\RegistersUsers; use Illuminate\Support\Facades\App; -use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; -use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; use Illuminate\Validation\ValidationException; @@ -54,28 +51,34 @@ public function __construct() /** * Get a validator for an incoming registration request. * - * @param array $data + * @param array $data * @return \Illuminate\Contracts\Validation\Validator */ protected function validator(array $data) { $validationRules = [ - 'name' => ['required', 'string', 'max:30', 'min:4', 'alpha_num', 'unique:users'], - 'email' => ['required', 'string', 'email', 'max:64', 'unique:users'], - 'password' => ['required', 'string', 'min:8', 'confirmed'], + 'name' => ['required', 'string', 'max:30', 'min:4', 'alpha_num', 'unique:users'], + 'email' => ['required', 'string', 'email', 'max:64', 'unique:users'], + 'password' => ['required', 'string', 'min:8', 'confirmed'], ]; if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') { $validationRules['g-recaptcha-response'] = ['required', 'recaptcha']; } + if (config('SETTINGS::SYSTEM:SHOW_TOS') == 'true') { + $validationRules['terms'] = ['required']; + } if (config('SETTINGS::SYSTEM:REGISTER_IP_CHECK', 'true') == 'true') { //check if ip has already made an account $data['ip'] = session()->get('ip') ?? request()->ip(); - if (User::where('ip', '=', request()->ip())->exists()) session()->put('ip', request()->ip()); - $validationRules['ip'] = ['unique:users']; + if (User::where('ip', '=', request()->ip())->exists()) { + session()->put('ip', request()->ip()); + } + $validationRules['ip'] = ['unique:users']; + return Validator::make($data, $validationRules, [ - 'ip.unique' => "You have already made an account! Please contact support if you think this is incorrect." + 'ip.unique' => 'You have already made an account! Please contact support if you think this is incorrect.', ]); } @@ -85,43 +88,46 @@ protected function validator(array $data) /** * Create a unique Referral Code for User + * * @return string */ - protected function createReferralCode(){ + protected function createReferralCode() + { $referralcode = STR::random(8); if (User::where('referral_code', '=', $referralcode)->exists()) { $this->createReferralCode(); } + return $referralcode; } /** * Create a new user instance after a valid registration. * - * @param array $data + * @param array $data * @return User */ protected function create(array $data) { $user = User::create([ - 'name' => $data['name'], - 'email' => $data['email'], - 'credits' => config('SETTINGS::USER:INITIAL_CREDITS', 150), + 'name' => $data['name'], + 'email' => $data['email'], + 'credits' => config('SETTINGS::USER:INITIAL_CREDITS', 150), 'server_limit' => config('SETTINGS::USER:INITIAL_SERVER_LIMIT', 1), - 'password' => Hash::make($data['password']), + 'password' => Hash::make($data['password']), 'referral_code' => $this->createReferralCode(), ]); $response = Pterodactyl::client()->post('/application/users', [ - "external_id" => App::environment('local') ? Str::random(16) : (string)$user->id, - "username" => $user->name, - "email" => $user->email, - "first_name" => $user->name, - "last_name" => $user->name, - "password" => $data['password'], - "root_admin" => false, - "language" => "en" + 'external_id' => App::environment('local') ? Str::random(16) : (string) $user->id, + 'username' => $user->name, + 'email' => $user->email, + 'first_name' => $user->name, + 'last_name' => $user->name, + 'password' => $data['password'], + 'root_admin' => false, + 'language' => 'en', ]); if ($response->failed()) { @@ -132,33 +138,32 @@ protected function create(array $data) } $user->update([ - 'pterodactyl_id' => $response->json()['attributes']['id'] + 'pterodactyl_id' => $response->json()['attributes']['id'], ]); //INCREMENT REFERRAL-USER CREDITS - if(!empty($data['referral_code'])){ + if (! empty($data['referral_code'])) { $ref_code = $data['referral_code']; $new_user = $user->id; - if($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) { - if(config("SETTINGS::REFERRAL:MODE") == "sign-up" || config("SETTINGS::REFERRAL:MODE") == "both") { - $ref_user->increment('credits', config("SETTINGS::REFERRAL::REWARD")); + if ($ref_user = User::query()->where('referral_code', '=', $ref_code)->first()) { + if (config('SETTINGS::REFERRAL:MODE') == 'sign-up' || config('SETTINGS::REFERRAL:MODE') == 'both') { + $ref_user->increment('credits', config('SETTINGS::REFERRAL::REWARD')); $ref_user->notify(new ReferralNotification($ref_user->id, $new_user)); //LOGS REFERRALS IN THE ACTIVITY LOG activity() ->performedOn($user) ->causedBy($ref_user) - ->log('gained '. config("SETTINGS::REFERRAL::REWARD").' '.config("SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME").' for sign-up-referral of '.$user->name.' (ID:'.$user->id.')'); + ->log('gained '.config('SETTINGS::REFERRAL::REWARD').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').' for sign-up-referral of '.$user->name.' (ID:'.$user->id.')'); } //INSERT INTO USER_REFERRALS TABLE DB::table('user_referrals')->insert([ 'referral_id' => $ref_user->id, 'registered_user_id' => $user->id, - 'created_at' => Carbon::now(), - 'updated_at' => Carbon::now() + 'created_at' => Carbon::now(), + 'updated_at' => Carbon::now(), ]); } - } return $user; diff --git a/app/Http/Controllers/Auth/SocialiteController.php b/app/Http/Controllers/Auth/SocialiteController.php index c91a18f37..101a367a2 100644 --- a/app/Http/Controllers/Auth/SocialiteController.php +++ b/app/Http/Controllers/Auth/SocialiteController.php @@ -4,10 +4,7 @@ use App\Http\Controllers\Controller; use App\Models\DiscordUser; -use App\Models\Settings; use App\Models\User; -use App\Models\Voucher; -use Exception; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Http; use Laravel\Socialite\Facades\Socialite; @@ -16,7 +13,7 @@ class SocialiteController extends Controller { public function redirect() { - $scopes = !empty(config("SETTINGS::DISCORD:BOT_TOKEN")) && !empty(config("SETTINGS::DISCORD:GUILD_ID")) ? ['guilds.join'] : []; + $scopes = ! empty(config('SETTINGS::DISCORD:BOT_TOKEN')) && ! empty(config('SETTINGS::DISCORD:GUILD_ID')) ? ['guilds.join'] : []; return Socialite::driver('discord') ->scopes($scopes) @@ -32,40 +29,39 @@ public function callback() /** @var User $user */ $user = Auth::user(); $discord = Socialite::driver('discord')->user(); - $botToken = config("SETTINGS::DISCORD:BOT_TOKEN"); - $guildId = config("SETTINGS::DISCORD:GUILD_ID"); - $roleId = config("SETTINGS::DISCORD:ROLE_ID"); + $botToken = config('SETTINGS::DISCORD:BOT_TOKEN'); + $guildId = config('SETTINGS::DISCORD:GUILD_ID'); + $roleId = config('SETTINGS::DISCORD:ROLE_ID'); - //save / update discord_users + //save / update discord_users - //check if discord account is already linked to an cpgg account - if (is_null($user->discordUser)) { - $discordLinked = DiscordUser::where('id', '=', $discord->id)->first(); - if ($discordLinked !== null) { - return redirect()->route('profile.index')->with( + //check if discord account is already linked to an cpgg account + if (is_null($user->discordUser)) { + $discordLinked = DiscordUser::where('id', '=', $discord->id)->first(); + if ($discordLinked !== null) { + return redirect()->route('profile.index')->with( 'error', 'Discord account already linked!' ); - } - - //create discord user in db - DiscordUser::create(array_merge($discord->user, ['user_id' => Auth::user()->id])); + } - //update user - Auth::user()->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD')); - Auth::user()->increment('server_limit', config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD')); - Auth::user()->update(['discord_verified_at' => now()]); + //create discord user in db + DiscordUser::create(array_merge($discord->user, ['user_id' => Auth::user()->id])); - } else { - $user->discordUser->update($discord->user); - } + //update user + Auth::user()->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD')); + Auth::user()->increment('server_limit', config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD')); + Auth::user()->update(['discord_verified_at' => now()]); + } else { + $user->discordUser->update($discord->user); + } //force user into discord server //TODO Add event on failure, to notify ppl involved - if (!empty($guildId) && !empty($botToken)) { + if (! empty($guildId) && ! empty($botToken)) { $response = Http::withHeaders( [ - 'Authorization' => 'Bot ' . $botToken, + 'Authorization' => 'Bot '.$botToken, 'Content-Type' => 'application/json', ] )->put( @@ -74,10 +70,10 @@ public function callback() ); //give user a role in the discord server - if (!empty($roleId)) { + if (! empty($roleId)) { $response = Http::withHeaders( [ - 'Authorization' => 'Bot ' . $botToken, + 'Authorization' => 'Bot '.$botToken, 'Content-Type' => 'application/json', ] )->put( diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 27ff778b7..ce72d9477 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -2,30 +2,36 @@ namespace App\Http\Controllers; +use App\Models\PartnerDiscount; use App\Models\UsefulLink; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Facades\URL; - class HomeController extends Controller { - const TIME_LEFT_BG_SUCCESS = "bg-success"; - const TIME_LEFT_BG_WARNING = "bg-warning"; - const TIME_LEFT_BG_DANGER = "bg-danger"; + const TIME_LEFT_BG_SUCCESS = 'bg-success'; + + const TIME_LEFT_BG_WARNING = 'bg-warning'; + + const TIME_LEFT_BG_DANGER = 'bg-danger'; public function __construct() { $this->middleware('auth'); } - public function callHome(){ - if(Storage::exists("callHome")){return;} + public function callHome() + { + if (Storage::exists('callHome')) { + return; + } Http::asForm()->post('https://market.controlpanel.gg/callhome.php', [ - 'id' => Hash::make(URL::current()) + 'id' => Hash::make(URL::current()), ]); Storage::put('callHome', 'This is only used to count the installations of cpgg.'); } @@ -33,8 +39,7 @@ public function callHome(){ /** * @description Get the Background Color for the Days-Left-Box in HomeView * - * @param float $daysLeft - * + * @param float $daysLeft * @return string */ public function getTimeLeftBoxBackground(float $daysLeft): string @@ -45,36 +50,40 @@ public function getTimeLeftBoxBackground(float $daysLeft): string if ($daysLeft <= 7) { return $this::TIME_LEFT_BG_DANGER; } + return $this::TIME_LEFT_BG_WARNING; } - /** * @description Set "hours", "days" or nothing behind the remaining time * - * @param float $daysLeft - * @param float $hoursLeft - * + * @param float $daysLeft + * @param float $hoursLeft * @return string|void */ public function getTimeLeftBoxUnit(float $daysLeft, float $hoursLeft) { - if ($daysLeft > 1) return __('days'); - return $hoursLeft < 1 ? null : __("hours"); + if ($daysLeft > 1) { + return __('days'); + } + + return $hoursLeft < 1 ? null : __('hours'); } /** * @description Get the Text for the Days-Left-Box in HomeView * - * @param float $daysLeft - * @param float $hoursLeft - * + * @param float $daysLeft + * @param float $hoursLeft * @return string */ public function getTimeLeftBoxText(float $daysLeft, float $hoursLeft) { - if ($daysLeft > 1) return strval(number_format($daysLeft, 0)); - return ($hoursLeft < 1 ? __("You ran out of Credits") : strval($hoursLeft)); + if ($daysLeft > 1) { + return strval(number_format($daysLeft, 0)); + } + + return $hoursLeft < 1 ? __('You ran out of Credits') : strval($hoursLeft); } /** Show the application dashboard. */ @@ -82,9 +91,9 @@ public function index(Request $request) { $usage = Auth::user()->creditUsage(); $credits = Auth::user()->Credits(); - $bg = ""; - $boxText = ""; - $unit = ""; + $bg = ''; + $boxText = ''; + $unit = ''; /** Build our Time-Left-Box */ if ($credits > 0.01 and $usage > 0) { @@ -93,7 +102,7 @@ public function index(Request $request) $bg = $this->getTimeLeftBoxBackground($daysLeft); $boxText = $this->getTimeLeftBoxText($daysLeft, $hoursLeft); - $unit = $daysLeft < 1 ? ($hoursLeft < 1 ? null : __("hours")) : __("days"); + $unit = $daysLeft < 1 ? ($hoursLeft < 1 ? null : __('hours')) : __('days'); } $this->callhome(); @@ -105,7 +114,10 @@ public function index(Request $request) 'useful_links' => UsefulLink::all()->sortBy('id'), 'bg' => $bg, 'boxText' => $boxText, - 'unit' => $unit + 'unit' => $unit, + 'numberOfReferrals' => DB::table('user_referrals')->where('referral_id', '=', Auth::user()->id)->count(), + 'partnerDiscount' => PartnerDiscount::where('user_id', Auth::user()->id)->first(), + 'myDiscount' => PartnerDiscount::getDiscount(), ]); } } diff --git a/app/Http/Controllers/Moderation/TicketsController.php b/app/Http/Controllers/Moderation/TicketsController.php index ac08ba08c..be974ad2b 100644 --- a/app/Http/Controllers/Moderation/TicketsController.php +++ b/app/Http/Controllers/Moderation/TicketsController.php @@ -2,63 +2,71 @@ namespace App\Http\Controllers\Moderation; -use App\Models\User; -use App\Models\Ticket; +use App\Http\Controllers\Controller; use App\Models\Server; +use App\Models\Ticket; +use App\Models\TicketBlacklist; use App\Models\TicketCategory; use App\Models\TicketComment; -use App\Models\TicketBlacklist; - -use App\Http\Controllers\Controller; -use Illuminate\Support\Facades\Cache; +use App\Models\User; +use App\Notifications\Ticket\User\ReplyNotification; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; -use App\Notifications\Ticket\User\ReplyNotification; class TicketsController extends Controller { - public function index() { - $tickets = Ticket::orderBy('id','desc')->paginate(10); + public function index() + { + $tickets = Ticket::orderBy('id', 'desc')->paginate(10); $ticketcategories = TicketCategory::all(); - return view("moderator.ticket.index", compact("tickets", "ticketcategories")); + + return view('moderator.ticket.index', compact('tickets', 'ticketcategories')); } - public function show($ticket_id) { - $ticket = Ticket::where("ticket_id", $ticket_id)->firstOrFail(); + + public function show($ticket_id) + { + $ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail(); $ticketcomments = $ticket->ticketcomments; $ticketcategory = $ticket->ticketcategory; $server = Server::where('id', $ticket->server)->first(); - return view("moderator.ticket.show", compact("ticket", "ticketcategory", "ticketcomments", "server")); + + return view('moderator.ticket.show', compact('ticket', 'ticketcategory', 'ticketcomments', 'server')); } - public function close($ticket_id) { - $ticket = Ticket::where("ticket_id", $ticket_id)->firstOrFail(); - $ticket->status = "Closed"; + public function close($ticket_id) + { + $ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail(); + $ticket->status = 'Closed'; $ticket->save(); $ticketOwner = $ticket->user; - return redirect()->back()->with('success', __('A ticket has been closed, ID: #') . $ticket->ticket_id); + + return redirect()->back()->with('success', __('A ticket has been closed, ID: #').$ticket->ticket_id); } - public function delete($ticket_id){ - $ticket = Ticket::where("ticket_id", $ticket_id)->firstOrFail(); - TicketComment::where("ticket_id", $ticket->id)->delete(); + public function delete($ticket_id) + { + $ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail(); + TicketComment::where('ticket_id', $ticket->id)->delete(); $ticket->delete(); - return redirect()->back()->with('success', __('A ticket has been deleted, ID: #') . $ticket_id); + return redirect()->back()->with('success', __('A ticket has been deleted, ID: #').$ticket_id); } - public function reply(Request $request) { - $this->validate($request, array("ticketcomment" => "required")); - $ticket = Ticket::where('id', $request->input("ticket_id"))->firstOrFail(); - $ticket->status = "Answered"; + public function reply(Request $request) + { + $this->validate($request, ['ticketcomment' => 'required']); + $ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail(); + $ticket->status = 'Answered'; $ticket->update(); - TicketComment::create(array( - "ticket_id" => $request->input("ticket_id"), - "user_id" => Auth::user()->id, - "ticketcomment" => $request->input("ticketcomment"), - )); + TicketComment::create([ + 'ticket_id' => $request->input('ticket_id'), + 'user_id' => Auth::user()->id, + 'ticketcomment' => $request->input('ticketcomment'), + ]); $user = User::where('id', $ticket->user_id)->firstOrFail(); - $newmessage = $request->input("ticketcomment"); + $newmessage = $request->input('ticketcomment'); $user->notify(new ReplyNotification($ticket, $user, $newmessage)); + return redirect()->back()->with('success', __('Your comment has been submitted')); } @@ -71,23 +79,23 @@ public function dataTable() return $tickets->ticketcategory->name; }) ->editColumn('title', function (Ticket $tickets) { - return '' . "#" . $tickets->ticket_id . " - " . $tickets->title . ''; + return ''.'#'.$tickets->ticket_id.' - '.htmlspecialchars($tickets->title).''; }) ->editColumn('user_id', function (Ticket $tickets) { - return '' . $tickets->user->name . ''; + return ''.$tickets->user->name.''; }) ->addColumn('actions', function (Ticket $tickets) { return ' - -
- ' . csrf_field() . ' - ' . method_field("POST") . ' - + + + '.csrf_field().' + '.method_field('POST').' +
-
- ' . csrf_field() . ' - ' . method_field("POST") . ' - + + '.csrf_field().' + '.method_field('POST').' +
'; }) @@ -107,93 +115,102 @@ public function dataTable() break; } - return '' . $tickets->status . ''; + return ''.$tickets->status.''; + }) + ->editColumn('priority', function (Ticket $tickets) { + return __($tickets->priority); }) ->editColumn('updated_at', function (Ticket $tickets) { - return $tickets->updated_at ? $tickets->updated_at->diffForHumans() : ''; + return ['display' => $tickets->updated_at ? $tickets->updated_at->diffForHumans() : '', + 'raw' => $tickets->updated_at ? strtotime($tickets->updated_at) : '']; }) - ->rawColumns(['category', 'title', 'user_id', 'status', 'updated_at', 'actions']) + ->rawColumns(['category', 'title', 'user_id', 'status', 'priority', 'updated_at', 'actions']) ->make(true); } - public function blacklist() { - return view("moderator.ticket.blacklist"); + public function blacklist() + { + return view('moderator.ticket.blacklist'); } - public function blacklistAdd(Request $request) { + public function blacklistAdd(Request $request) + { $user = User::where('id', $request->user_id)->first(); $check = TicketBlacklist::where('user_id', $user->id)->first(); - if($check){ + if ($check) { $check->reason = $request->reason; - $check->status = "True"; + $check->status = 'True'; $check->save(); return redirect()->back()->with('info', __('Target User already in blacklist. Reason updated')); } - TicketBlacklist::create(array( - "user_id" => $user->id, - "status" => "True", - "reason" => $request->reason, - )); - return redirect()->back()->with('success', __('Successfully add User to blacklist, User name: ' . $user->name)); - } + TicketBlacklist::create([ + 'user_id' => $user->id, + 'status' => 'True', + 'reason' => $request->reason, + ]); + return redirect()->back()->with('success', __('Successfully add User to blacklist, User name: '.$user->name)); + } - public function blacklistDelete($id) { + public function blacklistDelete($id) + { $blacklist = TicketBlacklist::where('id', $id)->first(); $blacklist->delete(); - return redirect()->back()->with('success', __('Successfully remove User from blacklist, User name: ' . $blacklist->user->name)); + + return redirect()->back()->with('success', __('Successfully remove User from blacklist, User name: '.$blacklist->user->name)); } - public function blacklistChange($id) { + public function blacklistChange($id) + { $blacklist = TicketBlacklist::where('id', $id)->first(); - if($blacklist->status == "True") - { - $blacklist->status = "False"; - + if ($blacklist->status == 'True') { + $blacklist->status = 'False'; } else { - $blacklist->status = "True"; + $blacklist->status = 'True'; } $blacklist->update(); - return redirect()->back()->with('success', __('Successfully change status blacklist from, User name: ' . $blacklist->user->name)); + return redirect()->back()->with('success', __('Successfully change status blacklist from, User name: '.$blacklist->user->name)); } + public function dataTableBlacklist() { $query = TicketBlacklist::with(['user']); $query->select('ticket_blacklists.*'); + return datatables($query) ->editColumn('user', function (TicketBlacklist $blacklist) { - return '' . $blacklist->user->name . ''; + return ''.$blacklist->user->name.''; }) ->editColumn('status', function (TicketBlacklist $blacklist) { switch ($blacklist->status) { case 'True': - $text = "Blocked"; + $text = 'Blocked'; $badgeColor = 'badge-danger'; break; default: - $text = "Unblocked"; + $text = 'Unblocked'; $badgeColor = 'badge-success'; break; } - return '' . $text . ''; + return ''.$text.''; }) ->editColumn('reason', function (TicketBlacklist $blacklist) { return $blacklist->reason; }) ->addColumn('actions', function (TicketBlacklist $blacklist) { return ' -
- ' . csrf_field() . ' - ' . method_field("POST") . ' - + + '.csrf_field().' + '.method_field('POST').' +
-
- ' . csrf_field() . ' - ' . method_field("POST") . ' - + + '.csrf_field().' + '.method_field('POST').' +
'; }) @@ -203,5 +220,4 @@ public function dataTableBlacklist() ->rawColumns(['user', 'status', 'reason', 'created_at', 'actions']) ->make(true); } - } diff --git a/app/Http/Controllers/NotificationController.php b/app/Http/Controllers/NotificationController.php index 7853c1ac0..c8ee5912b 100644 --- a/app/Http/Controllers/NotificationController.php +++ b/app/Http/Controllers/NotificationController.php @@ -10,8 +10,9 @@ class NotificationController extends Controller public function index() { $notifications = Auth::user()->notifications()->paginate(); + return view('notifications.index')->with([ - 'notifications' => $notifications + 'notifications' => $notifications, ]); } @@ -21,17 +22,19 @@ public function show(string $id) $notification = Auth::user()->notifications()->findOrFail($id); $notification->markAsRead(); + return view('notifications.show')->with([ - 'notification' => $notification + 'notification' => $notification, ]); } - public function readAll(){ + public function readAll() + { $notifications = Auth::user()->notifications()->get(); - foreach($notifications as $notification){ + foreach ($notifications as $notification) { $notification->markAsRead(); } - return redirect()->back(); + return redirect()->back(); } } diff --git a/app/Http/Controllers/PartnerController.php b/app/Http/Controllers/PartnerController.php new file mode 100644 index 000000000..887e56d3c --- /dev/null +++ b/app/Http/Controllers/PartnerController.php @@ -0,0 +1,217 @@ + PartnerDiscount::get(), + 'users' => User::orderBy('name')->get(), + ]); + } + + /** + * Store a newly created resource in storage. + * + * @param Request $request + * @return RedirectResponse + */ + public function store(Request $request) + { + $request->validate([ + 'user_id' => 'required|integer|min:0', + 'partner_discount' => 'required|integer|max:100|min:0', + 'registered_user_discount' => 'required|integer|max:100|min:0', + ]); + + PartnerDiscount::create($request->all()); + + return redirect()->route('admin.partners.index')->with('success', __('partner has been created!')); + } + + /** + * Display the specified resource. + * + * @param Voucher $voucher + * @return Response + */ + public function show(Voucher $voucher) + { + // + } + + /** + * Show the form for editing the specified resource. + * + * @param Voucher $voucher + * @return Application|Factory|View + */ + public function edit(PartnerDiscount $partner) + { + return view('admin.partners.edit', [ + 'partners' => PartnerDiscount::get(), + 'partner' => $partner, + 'users' => User::orderBy('name')->get(), + ]); + } + + /** + * Update the specified resource in storage. + * + * @param Request $request + * @param Voucher $voucher + * @return RedirectResponse + */ + public function update(Request $request, PartnerDiscount $partner) + { + //dd($request); + $request->validate([ + 'user_id' => 'required|integer|min:0', + 'partner_discount' => 'required|integer|max:100|min:0', + 'registered_user_discount' => 'required|integer|max:100|min:0', + ]); + + $partner->update($request->all()); + + return redirect()->route('admin.partners.index')->with('success', __('partner has been updated!')); + } + + /** + * Remove the specified resource from storage. + * + * @param Voucher $voucher + * @return RedirectResponse + */ + public function destroy(PartnerDiscount $partner) + { + $partner->delete(); + + return redirect()->back()->with('success', __('partner has been removed!')); + } + + public function users(Voucher $voucher) + { + return view('admin.vouchers.users', [ + 'voucher' => $voucher, + ]); + } + + /** + * @param Request $request + * @return JsonResponse + * + * @throws ValidationException + */ + public function redeem(Request $request) + { + //general validations + $request->validate([ + 'code' => 'required|exists:vouchers,code', + ]); + + //get voucher by code + $voucher = Voucher::where('code', '=', $request->input('code'))->firstOrFail(); + + //extra validations + if ($voucher->getStatus() == 'USES_LIMIT_REACHED') { + throw ValidationException::withMessages([ + 'code' => __('This voucher has reached the maximum amount of uses'), + ]); + } + + if ($voucher->getStatus() == 'EXPIRED') { + throw ValidationException::withMessages([ + 'code' => __('This voucher has expired'), + ]); + } + + if (! $request->user()->vouchers()->where('id', '=', $voucher->id)->get()->isEmpty()) { + throw ValidationException::withMessages([ + 'code' => __('You already redeemed this voucher code'), + ]); + } + + if ($request->user()->credits + $voucher->credits >= 99999999) { + throw ValidationException::withMessages([ + 'code' => "You can't redeem this voucher because you would exceed the limit of ".CREDITS_DISPLAY_NAME, + ]); + } + + //redeem voucher + $voucher->redeem($request->user()); + + event(new UserUpdateCreditsEvent($request->user())); + + return response()->json([ + 'success' => "{$voucher->credits} ".CREDITS_DISPLAY_NAME.' '.__('have been added to your balance!'), + ]); + } + + public function usersDataTable(Voucher $voucher) + { + $users = $voucher->users(); + + return datatables($users) + ->editColumn('name', function (User $user) { + return ''.$user->name.''; + }) + ->addColumn('credits', function (User $user) { + return ' '.$user->credits(); + }) + ->addColumn('last_seen', function (User $user) { + return $user->last_seen ? $user->last_seen->diffForHumans() : ''; + }) + ->rawColumns(['name', 'credits', 'last_seen']) + ->make(); + } + + public function dataTable() + { + $query = PartnerDiscount::query(); + + return datatables($query) + ->addColumn('actions', function (PartnerDiscount $partner) { + return ' + +
+ '.csrf_field().' + '.method_field('DELETE').' + +
+ '; + }) + ->addColumn('user', function (PartnerDiscount $partner) { + return ($user = User::where('id', $partner->user_id)->first()) ? ''.$user->name.'' : __('Unknown user'); + }) + ->editColumn('created_at', function (PartnerDiscount $partner) { + return $partner->created_at ? $partner->created_at->diffForHumans() : ''; + }) + ->editColumn('partner_discount', function (PartnerDiscount $partner) { + return $partner->partner_discount ? $partner->partner_discount.'%' : '0%'; + }) + ->editColumn('registered_user_discount', function (PartnerDiscount $partner) { + return $partner->registered_user_discount ? $partner->registered_user_discount.'%' : '0%'; + }) + ->editColumn('referral_system_commission', function (PartnerDiscount $partner) { + return $partner->referral_system_commission >= 0 ? $partner->referral_system_commission.'%' : __('Default').' ('.config('SETTINGS::REFERRAL:PERCENTAGE').'%)'; + }) + ->rawColumns(['user', 'actions']) + ->make(); + } +} diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index 61e480f07..117ac33e1 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -16,15 +16,18 @@ class ProductController extends Controller { /** * @description get product locations based on selected egg - * @param Request $request - * @param Egg $egg + * + * @param Request $request + * @param Egg $egg * @return Collection|JsonResponse */ public function getNodesBasedOnEgg(Request $request, Egg $egg) { - if (is_null($egg->id)) return response()->json('Egg ID is required', '400'); + if (is_null($egg->id)) { + return response()->json('Egg ID is required', '400'); + } - #get products that include this egg + //get products that include this egg $products = Product::query() ->with('nodes') ->where('disabled', '=', false) @@ -34,31 +37,33 @@ public function getNodesBasedOnEgg(Request $request, Egg $egg) $nodes = collect(); - #filter unique nodes + //filter unique nodes $products->each(function (Product $product) use ($nodes) { $product->nodes->each(function (Node $node) use ($nodes) { - if (!$nodes->contains('id', $node->id) && !$node->disabled) { + if (! $nodes->contains('id', $node->id) && ! $node->disabled) { $nodes->add($node); } }); }); - return $nodes; } /** * @description get product locations based on selected egg - * @param Request $request - * @param Egg $egg + * + * @param Request $request + * @param Egg $egg * @return Collection|JsonResponse */ public function getLocationsBasedOnEgg(Request $request, Egg $egg) { $nodes = $this->getNodesBasedOnEgg($request, $egg); - foreach($nodes as $key => $node){ + foreach ($nodes as $key => $node) { $pteroNode = Pterodactyl::getNode($node->id); - if($pteroNode['allocated_resources']['memory']>=($pteroNode['memory']*($pteroNode['memory_overallocate']+100)/100)||$pteroNode['allocated_resources']['disk']>=($pteroNode['disk']*($pteroNode['disk_overallocate']+100)/100)) $nodes->forget($key); + if ($pteroNode['allocated_resources']['memory'] >= ($pteroNode['memory'] * ($pteroNode['memory_overallocate'] + 100) / 100) || $pteroNode['allocated_resources']['disk'] >= ($pteroNode['disk'] * ($pteroNode['disk_overallocate'] + 100) / 100)) { + $nodes->forget($key); + } } $locations = collect(); @@ -67,7 +72,7 @@ public function getLocationsBasedOnEgg(Request $request, Egg $egg) /** @var Location $location */ $location = $node->location; - if (!$locations->contains('id', $location->id)) { + if (! $locations->contains('id', $location->id)) { $nodeIds = $nodes->map(function ($node) { return $node->id; }); @@ -84,13 +89,15 @@ public function getLocationsBasedOnEgg(Request $request, Egg $egg) } /** - * @param Node $node - * @param Egg $egg + * @param Node $node + * @param Egg $egg * @return Collection|JsonResponse */ public function getProductsBasedOnNode(Egg $egg, Node $node) { - if (is_null($egg->id) || is_null($node->id)) return response()->json('node and egg id is required', '400'); + if (is_null($egg->id) || is_null($node->id)) { + return response()->json('node and egg id is required', '400'); + } $products = Product::query() ->where('disabled', '=', false) @@ -103,8 +110,10 @@ public function getProductsBasedOnNode(Egg $egg, Node $node) ->get(); $pteroNode = Pterodactyl::getNode($node->id); - foreach($products as $key => $product){ - if($product->memory>($pteroNode['memory']*($pteroNode['memory_overallocate']+100)/100)-$pteroNode['allocated_resources']['memory']||$product->disk>($pteroNode['disk']*($pteroNode['disk_overallocate']+100)/100)-$pteroNode['allocated_resources']['disk']) $product->doesNotFit = true; + foreach ($products as $key => $product) { + if ($product->memory > ($pteroNode['memory'] * ($pteroNode['memory_overallocate'] + 100) / 100) - $pteroNode['allocated_resources']['memory'] || $product->disk > ($pteroNode['disk'] * ($pteroNode['disk_overallocate'] + 100) / 100) - $pteroNode['allocated_resources']['disk']) { + $product->doesNotFit = true; + } } return $products; diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 3d9a2d38d..bffbc9638 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -2,7 +2,6 @@ namespace App\Http\Controllers; - use App\Classes\Pterodactyl; use App\Models\User; use Illuminate\Http\RedirectResponse; @@ -30,6 +29,7 @@ public function index() $badgeColor = 'badge-secondary'; break; } + return view('profile.index')->with([ 'user' => Auth::user(), 'credits_reward_after_verify_discord' => config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD'), @@ -39,68 +39,81 @@ public function index() ]); } + public function selfDestroyUser() + { + $user = Auth::user(); + if ($user->role == "admin") return back()->with("error", "You cannot delete yourself as an admin!"); + + $user->delete(); + + return redirect('/login')->with('success', __('Account permanently deleted!')); + } + /** Update the specified resource in storage. - * @param Request $request - * @param int $id + * @param Request $request + * @param int $id * @return RedirectResponse */ public function update(Request $request, int $id) { //prevent other users from editing a user - if ($id != Auth::user()->id) dd(401); + if ($id != Auth::user()->id) { + dd(401); + } $user = User::findOrFail($id); //update password if necessary - if (!is_null($request->input('new_password'))) { + if (! is_null($request->input('new_password'))) { //validate password request $request->validate([ 'current_password' => [ 'required', function ($attribute, $value, $fail) use ($user) { - if (!Hash::check($value, $user->password)) { - $fail('The ' . $attribute . ' is invalid.'); + if (! Hash::check($value, $user->password)) { + $fail('The '.$attribute.' is invalid.'); } }, ], 'new_password' => 'required|string|min:8', - 'new_password_confirmation' => 'required|same:new_password' + 'new_password_confirmation' => 'required|same:new_password', ]); //Update Users Password on Pterodactyl //Username,Mail,First and Lastname are required aswell $response = Pterodactyl::client()->patch('/application/users/'.$user->pterodactyl_id, [ - "password" => $request->input('new_password'), - "username" => $request->input('name'), - "first_name" => $request->input('name'), - "last_name" => $request->input('name'), - "email" => $request->input('email'), + 'password' => $request->input('new_password'), + 'username' => $request->input('name'), + 'first_name' => $request->input('name'), + 'last_name' => $request->input('name'), + 'email' => $request->input('email'), ]); if ($response->failed()) { throw ValidationException::withMessages([ 'pterodactyl_error_message' => $response->toException()->getMessage(), - 'pterodactyl_error_status' => $response->toException()->getCode() + 'pterodactyl_error_status' => $response->toException()->getCode(), ]); } //update password $user->update([ 'password' => Hash::make($request->input('new_password')), ]); - } //validate request $request->validate([ - 'name' => 'required|min:4|max:30|alpha_num|unique:users,name,' . $id . ',id', - 'email' => 'required|email|max:64|unique:users,email,' . $id . ',id', - 'avatar' => 'nullable' + 'name' => 'required|min:4|max:30|alpha_num|unique:users,name,'.$id.',id', + 'email' => 'required|email|max:64|unique:users,email,'.$id.',id', + 'avatar' => 'nullable', ]); //update avatar - if (!is_null($request->input('avatar'))) { + if (! is_null($request->input('avatar'))) { $avatar = json_decode($request->input('avatar')); - if ($avatar->input->size > 3000000) abort(500); + if ($avatar->input->size > 3000000) { + abort(500); + } $user->update([ 'avatar' => $avatar->output->image, @@ -113,16 +126,16 @@ function ($attribute, $value, $fail) use ($user) { //update name and email on Pterodactyl $response = Pterodactyl::client()->patch('/application/users/'.$user->pterodactyl_id, [ - "username" => $request->input('name'), - "first_name" => $request->input('name'), - "last_name" => $request->input('name'), - "email" => $request->input('email'), + 'username' => $request->input('name'), + 'first_name' => $request->input('name'), + 'last_name' => $request->input('name'), + 'email' => $request->input('email'), ]); if ($response->failed()) { throw ValidationException::withMessages([ 'pterodactyl_error_message' => $response->toException()->getMessage(), - 'pterodactyl_error_status' => $response->toException()->getCode() + 'pterodactyl_error_status' => $response->toException()->getCode(), ]); } @@ -135,7 +148,7 @@ function ($attribute, $value, $fail) use ($user) { if ($request->input('email') != Auth::user()->email) { $user->reVerifyEmail(); $user->sendEmailVerificationNotification(); - }; + } return redirect()->route('profile.index')->with('success', __('Profile updated')); } diff --git a/app/Http/Controllers/ServerController.php b/app/Http/Controllers/ServerController.php index 905c702c5..656064c39 100644 --- a/app/Http/Controllers/ServerController.php +++ b/app/Http/Controllers/ServerController.php @@ -9,7 +9,6 @@ use App\Models\Node; use App\Models\Product; use App\Models\Server; -use App\Models\Settings; use App\Notifications\ServerCreationError; use Exception; use Illuminate\Database\Eloquent\Builder; @@ -31,7 +30,9 @@ public function index() //Get server infos from ptero $serverAttributes = Pterodactyl::getServerAttributes($server->pterodactyl_id, true); - if(!$serverAttributes) continue; + if (! $serverAttributes) { + continue; + } $serverRelationships = $serverAttributes['relationships']; $serverLocationAttributes = $serverRelationships['location']['attributes']; @@ -47,7 +48,7 @@ public function index() //Check if a server got renamed on Pterodactyl $savedServer = Server::query()->where('id', $server->id)->first(); - if($savedServer->name != $serverAttributes['name']){ + if ($savedServer->name != $serverAttributes['name']) { $savedServer->name = $serverAttributes['name']; $server->name = $serverAttributes['name']; $savedServer->save(); @@ -59,14 +60,16 @@ public function index() } return view('servers.index')->with([ - 'servers' => $servers + 'servers' => $servers, ]); } /** Show the form for creating a new resource. */ public function create() { - if (!is_null($this->validateConfigurationRules())) return $this->validateConfigurationRules(); + if (! is_null($this->validateConfigurationRules())) { + return $this->validateConfigurationRules(); + } $productCount = Product::query()->where('disabled', '=', false)->count(); $locations = Location::all(); @@ -90,11 +93,11 @@ public function create() return view('servers.create')->with([ 'productCount' => $productCount, - 'nodeCount' => $nodeCount, - 'nests' => $nests, - 'locations' => $locations, - 'eggs' => $eggs, - 'user' => Auth::user(), + 'nodeCount' => $nodeCount, + 'nests' => $nests, + 'locations' => $locations, + 'eggs' => $eggs, + 'user' => Auth::user(), ]); } @@ -109,8 +112,8 @@ private function validateConfigurationRules() } // minimum credits && Check for Allocation - if (FacadesRequest::has("product")) { - $product = Product::findOrFail(FacadesRequest::input("product")); + if (FacadesRequest::has('product')) { + $product = Product::findOrFail(FacadesRequest::input('product')); // Get node resource allocation info $node = $product->nodes()->findOrFail(FacadesRequest::input('node')); @@ -118,7 +121,9 @@ private function validateConfigurationRules() // Check if node has enough memory and disk space $checkResponse = Pterodactyl::checkNodeResources($node, $product->memory, $product->disk); - if ($checkResponse == False) return redirect()->route('servers.index')->with('error', __("The node '" . $nodeName . "' doesn't have the required memory or disk left to allocate this product.")); + if ($checkResponse == false) { + return redirect()->route('servers.index')->with('error', __("The node '".$nodeName."' doesn't have the required memory or disk left to allocate this product.")); + } // Min. Credits if ( @@ -127,24 +132,24 @@ private function validateConfigurationRules() ? config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', 50) : $product->minimum_credits) ) { - return redirect()->route('servers.index')->with('error', "You do not have the required amount of " . CREDITS_DISPLAY_NAME . " to use this product!"); + return redirect()->route('servers.index')->with('error', 'You do not have the required amount of '.CREDITS_DISPLAY_NAME.' to use this product!'); } } //Required Verification for creating an server - if (config('SETTINGS::USER:FORCE_EMAIL_VERIFICATION', 'false') === 'true' && !Auth::user()->hasVerifiedEmail()) { - return redirect()->route('profile.index')->with('error', __("You are required to verify your email address before you can create a server.")); + if (config('SETTINGS::USER:FORCE_EMAIL_VERIFICATION', 'false') === 'true' && ! Auth::user()->hasVerifiedEmail()) { + return redirect()->route('profile.index')->with('error', __('You are required to verify your email address before you can create a server.')); } - + //Required Verification for creating an server - if (!config('SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS', 'true') && Auth::user()->role != "admin") { - return redirect()->route('servers.index')->with('error', __("The system administrator has blocked the creation of new servers.")); + if (! config('SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS', 'true') && Auth::user()->role != 'admin') { + return redirect()->route('servers.index')->with('error', __('The system administrator has blocked the creation of new servers.')); } //Required Verification for creating an server - if (config('SETTINGS::USER:FORCE_DISCORD_VERIFICATION', 'false') === 'true' && !Auth::user()->discordUser) { - return redirect()->route('profile.index')->with('error', __("You are required to link your discord account before you can create a server.")); + if (config('SETTINGS::USER:FORCE_DISCORD_VERIFICATION', 'false') === 'true' && ! Auth::user()->discordUser) { + return redirect()->route('profile.index')->with('error', __('You are required to link your discord account before you can create a server.')); } return null; @@ -156,14 +161,15 @@ public function store(Request $request) /** @var Node $node */ /** @var Egg $egg */ /** @var Product $product */ - - if (!is_null($this->validateConfigurationRules())) return $this->validateConfigurationRules(); + if (! is_null($this->validateConfigurationRules())) { + return $this->validateConfigurationRules(); + } $request->validate([ - "name" => "required|max:191", - "node" => "required|exists:nodes,id", - "egg" => "required|exists:eggs,id", - "product" => "required|exists:products,id" + 'name' => 'required|max:191', + 'node' => 'required|exists:nodes,id', + 'egg' => 'required|exists:eggs,id', + 'product' => 'required|exists:products,id', ]); //get required resources @@ -172,23 +178,27 @@ public function store(Request $request) $node = $product->nodes()->findOrFail($request->input('node')); $server = $request->user()->servers()->create([ - 'name' => $request->input('name'), + 'name' => $request->input('name'), 'product_id' => $request->input('product'), ]); //get free allocation ID $allocationId = Pterodactyl::getFreeAllocationId($node); - if (!$allocationId) return $this->noAllocationsError($server); + if (! $allocationId) { + return $this->noAllocationsError($server); + } //create server on pterodactyl $response = Pterodactyl::createServer($server, $egg, $allocationId); - if ($response->failed()) return $this->serverCreationFailed($response, $server); + if ($response->failed()) { + return $this->serverCreationFailed($response, $server); + } $serverAttributes = $response->json()['attributes']; //update server with pterodactyl_id $server->update([ 'pterodactyl_id' => $serverAttributes['id'], - 'identifier' => $serverAttributes['identifier'] + 'identifier' => $serverAttributes['identifier'], ]); if (config('SETTINGS::SYSTEM:SERVER_CREATE_CHARGE_FIRST_HOUR', 'true') == 'true') { @@ -202,7 +212,8 @@ public function store(Request $request) /** * return redirect with error - * @param Server $server + * + * @param Server $server * @return RedirectResponse */ private function noAllocationsError(Server $server) @@ -210,13 +221,15 @@ private function noAllocationsError(Server $server) $server->delete(); Auth::user()->notify(new ServerCreationError($server)); + return redirect()->route('servers.index')->with('error', __('No allocations satisfying the requirements for automatic deployment on this node were found.')); } /** * return redirect with error - * @param Response $response - * @param Server $server + * + * @param Response $response + * @param Server $server * @return RedirectResponse */ private function serverCreationFailed(Response $response, Server $server) @@ -231,18 +244,19 @@ public function destroy(Server $server) { try { $server->delete(); + return redirect()->route('servers.index')->with('success', __('Server removed')); } catch (Exception $e) { - return redirect()->route('servers.index')->with('error', __('An exception has occurred while trying to remove a resource "') . $e->getMessage() . '"'); + return redirect()->route('servers.index')->with('error', __('An exception has occurred while trying to remove a resource "').$e->getMessage().'"'); } } /** Show Server Settings */ public function show(Server $server) { - - - if($server->user_id != Auth::user()->id){ return back()->with('error', __('Ā“This is not your Server!'));} + if ($server->user_id != Auth::user()->id) { + return back()->with('error', __('Ā“This is not your Server!')); + } $serverAttributes = Pterodactyl::getServerAttributes($server->pterodactyl_id); $serverRelationships = $serverAttributes['relationships']; $serverLocationAttributes = $serverRelationships['location']['attributes']; @@ -261,7 +275,7 @@ public function show(Server $server) $pteroNode = Pterodactyl::getNode($serverRelationships['node']['attributes']['id']); - $products = Product::orderBy("created_at") + $products = Product::orderBy('created_at') ->whereHas('nodes', function (Builder $builder) use ($serverRelationships) { //Only show products for that node $builder->where('id', '=', $serverRelationships['node']['attributes']['id']); }) @@ -270,20 +284,23 @@ public function show(Server $server) // Set the each product eggs array to just contain the eggs name foreach ($products as $product) { $product->eggs = $product->eggs->pluck('name')->toArray(); - if($product->memory-$currentProduct->memory>($pteroNode['memory']*($pteroNode['memory_overallocate']+100)/100)-$pteroNode['allocated_resources']['memory']||$product->disk-$currentProduct->disk>($pteroNode['disk']*($pteroNode['disk_overallocate']+100)/100)-$pteroNode['allocated_resources']['disk']) $product->doesNotFit = true; + if ($product->memory - $currentProduct->memory > ($pteroNode['memory'] * ($pteroNode['memory_overallocate'] + 100) / 100) - $pteroNode['allocated_resources']['memory'] || $product->disk - $currentProduct->disk > ($pteroNode['disk'] * ($pteroNode['disk_overallocate'] + 100) / 100) - $pteroNode['allocated_resources']['disk']) { + $product->doesNotFit = true; + } } return view('servers.settings')->with([ 'server' => $server, - 'products' => $products + 'products' => $products, ]); } public function upgrade(Server $server, Request $request) { - if($server->user_id != Auth::user()->id) return redirect()->route('servers.index'); - if(!isset($request->product_upgrade)) - { + if ($server->user_id != Auth::user()->id) { + return redirect()->route('servers.index'); + } + if (! isset($request->product_upgrade)) { return redirect()->route('servers.show', ['server' => $server->id])->with('error', __('this product is the only one')); } $user = Auth::user(); @@ -299,32 +316,35 @@ public function upgrade(Server $server, Request $request) // Check if node has enough memory and disk space $requireMemory = $newProduct->memory - $oldProduct->memory; - $requiredisk = $newProduct->disk - $oldProduct->disk; + $requiredisk = $newProduct->disk - $oldProduct->disk; $checkResponse = Pterodactyl::checkNodeResources($node, $requireMemory, $requiredisk); - if ($checkResponse == False) return redirect()->route('servers.index')->with('error', __("The node '" . $nodeName . "' doesn't have the required memory or disk left to upgrade the server.")); + if ($checkResponse == false) { + return redirect()->route('servers.index')->with('error', __("The node '".$nodeName."' doesn't have the required memory or disk left to upgrade the server.")); + } $priceupgrade = $newProduct->getHourlyPrice(); if ($priceupgrade < $oldProduct->getHourlyPrice()) { - $priceupgrade = 0; + $priceupgrade = 0; } - if ($user->credits >= $priceupgrade && $user->credits >= $newProduct->minimum_credits) - { - + if ($user->credits >= $priceupgrade && $user->credits >= $newProduct->minimum_credits) { $server->product_id = $request->product_upgrade; $server->update(); $server->allocation = $serverAttributes['allocation']; $response = Pterodactyl::updateServer($server, $newProduct); - if ($response->failed()) return $this->serverCreationFailed($response, $server); + if ($response->failed()) { + return $this->serverCreationFailed($response, $server); + } //update user balance $user->decrement('credits', $priceupgrade); //restart the server - $response = Pterodactyl::powerAction($server, "restart"); - if ($response->failed()) return redirect()->route('servers.index')->with('error', $response->json()['errors'][0]['detail']); + $response = Pterodactyl::powerAction($server, 'restart'); + if ($response->failed()) { + return redirect()->route('servers.index')->with('error', $response->json()['errors'][0]['detail']); + } + return redirect()->route('servers.show', ['server' => $server->id])->with('success', __('Server Successfully Upgraded')); - } - else - { + } else { return redirect()->route('servers.show', ['server' => $server->id])->with('error', __('Not Enough Balance for Upgrade')); } } diff --git a/app/Http/Controllers/StoreController.php b/app/Http/Controllers/StoreController.php index 8995d659c..fb4efe3ad 100644 --- a/app/Http/Controllers/StoreController.php +++ b/app/Http/Controllers/StoreController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers; use App\Models\ShopProduct; -use App\Models\Settings; use Illuminate\Support\Facades\Auth; class StoreController extends Controller @@ -15,18 +14,20 @@ public function index() if ( env('APP_ENV') == 'local' || - config("SETTINGS::PAYMENTS:PAYPAL:SECRET") && config("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID") || - config("SETTINGS::PAYMENTS:STRIPE:SECRET") && config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET") && config("SETTINGS::PAYMENTS:STRIPE:METHODS") - ) $isPaymentSetup = true; + config('SETTINGS::PAYMENTS:PAYPAL:SECRET') && config('SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID') || + config('SETTINGS::PAYMENTS:STRIPE:SECRET') && config('SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET') && config('SETTINGS::PAYMENTS:STRIPE:METHODS') + ) { + $isPaymentSetup = true; + } //Required Verification for creating an server - if (config('SETTINGS::USER:FORCE_EMAIL_VERIFICATION', false) === 'true' && !Auth::user()->hasVerifiedEmail()) { - return redirect()->route('profile.index')->with('error', __("You are required to verify your email address before you can purchase credits.")); + if (config('SETTINGS::USER:FORCE_EMAIL_VERIFICATION', false) === 'true' && ! Auth::user()->hasVerifiedEmail()) { + return redirect()->route('profile.index')->with('error', __('You are required to verify your email address before you can purchase credits.')); } //Required Verification for creating an server - if (config('SETTINGS::USER:FORCE_DISCORD_VERIFICATION', false) === 'true' && !Auth::user()->discordUser) { - return redirect()->route('profile.index')->with('error', __("You are required to link your discord account before you can purchase Credits")); + if (config('SETTINGS::USER:FORCE_DISCORD_VERIFICATION', false) === 'true' && ! Auth::user()->discordUser) { + return redirect()->route('profile.index')->with('error', __('You are required to link your discord account before you can purchase Credits')); } return view('store.index')->with([ diff --git a/app/Http/Controllers/TicketsController.php b/app/Http/Controllers/TicketsController.php index 8bb21a66a..e025f94dd 100644 --- a/app/Http/Controllers/TicketsController.php +++ b/app/Http/Controllers/TicketsController.php @@ -2,113 +2,132 @@ namespace App\Http\Controllers; -use App\Models\User; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\Session; -use Illuminate\Support\Facades\Auth; -use Illuminate\Support\Str; -use Illuminate\Support\Facades\Notification; - -use App\Models\Ticket; use App\Models\Server; -use App\Models\TicketComment; -use App\Models\TicketCategory; +use App\Models\Ticket; use App\Models\TicketBlacklist; -use App\Notifications\Ticket\User\CreateNotification; +use App\Models\TicketCategory; +use App\Models\TicketComment; +use App\Models\User; use App\Notifications\Ticket\Admin\AdminCreateNotification; use App\Notifications\Ticket\Admin\AdminReplyNotification; - +use App\Notifications\Ticket\User\CreateNotification; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Notification; +use Illuminate\Support\Str; class TicketsController extends Controller { public function index() { - $tickets = Ticket::where("user_id", Auth::user()->id)->paginate(10); + $tickets = Ticket::where('user_id', Auth::user()->id)->paginate(10); $ticketcategories = TicketCategory::all(); - - return view("ticket.index", compact("tickets", "ticketcategories")); + + return view('ticket.index', compact('tickets', 'ticketcategories')); } - public function create() { - #check in blacklist + + public function create() + { + //check in blacklist $check = TicketBlacklist::where('user_id', Auth::user()->id)->first(); - if($check && $check->status == "True"){ - return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator")); + if ($check && $check->status == 'True') { + return redirect()->route('ticket.index')->with('error', __("You can't make a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator")); } $ticketcategories = TicketCategory::all(); $servers = Auth::user()->servers; - return view("ticket.create", compact("ticketcategories", "servers")); + + return view('ticket.create', compact('ticketcategories', 'servers')); } - public function store(Request $request) { - $this->validate($request, array( - "title" => "required", - "ticketcategory" => "required", - "priority" => "required", - "message" => "required") - ); - $ticket = new Ticket(array( - "title" => $request->input("title"), - "user_id" => Auth::user()->id, - "ticket_id" => strtoupper(Str::random(5)), - "ticketcategory_id" => $request->input("ticketcategory"), - "priority" => $request->input("priority"), - "message" => $request->input("message"), - "status" => "Open", - "server" => $request->input("server")) - ); + + public function store(Request $request) + { + $this->validate($request, [ + 'title' => 'required', + 'ticketcategory' => 'required', + 'priority' => 'required', + 'message' => 'required', ] + ); + $ticket = new Ticket([ + 'title' => $request->input('title'), + 'user_id' => Auth::user()->id, + 'ticket_id' => strtoupper(Str::random(5)), + 'ticketcategory_id' => $request->input('ticketcategory'), + 'priority' => $request->input('priority'), + 'message' => $request->input('message'), + 'status' => 'Open', + 'server' => $request->input('server'), ] + ); $ticket->save(); $user = Auth::user(); - $admin = User::where('role', 'admin')->orWhere('role', 'mod')->get(); + if(config('SETTINGS::TICKET:NOTIFY') == "all"){ $admin = User::where('role', 'admin')->orWhere('role', 'mod')->get();} + if(config('SETTINGS::TICKET:NOTIFY') == "admin"){ $admin = User::where('role', 'admin')->get();} + if(config('SETTINGS::TICKET:NOTIFY') == "moderator"){ $admin = User::where('role', 'mod')->get();} $user->notify(new CreateNotification($ticket)); - Notification::send($admin, new AdminCreateNotification($ticket, $user)); - - return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #') . $ticket->ticket_id); + if(config('SETTINGS::TICKET:NOTIFY') != "none"){ + Notification::send($admin, new AdminCreateNotification($ticket, $user)); + } + + return redirect()->route('ticket.index')->with('success', __('A ticket has been opened, ID: #').$ticket->ticket_id); } - public function show($ticket_id) { - $ticket = Ticket::where("ticket_id", $ticket_id)->firstOrFail(); + + public function show($ticket_id) + { + $ticket = Ticket::where('ticket_id', $ticket_id)->firstOrFail(); $ticketcomments = $ticket->ticketcomments; $ticketcategory = $ticket->ticketcategory; $server = Server::where('id', $ticket->server)->first(); - return view("ticket.show", compact("ticket", "ticketcategory", "ticketcomments", "server")); + + return view('ticket.show', compact('ticket', 'ticketcategory', 'ticketcomments', 'server')); } - public function reply(Request $request) { - #check in blacklist + + public function reply(Request $request) + { + //check in blacklist $check = TicketBlacklist::where('user_id', Auth::user()->id)->first(); - if($check && $check->status == "True"){ - return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '" . $check->reason . "', please contact the administrator")); + if ($check && $check->status == 'True') { + return redirect()->route('ticket.index')->with('error', __("You can't reply a ticket because you're on the blacklist for a reason: '".$check->reason."', please contact the administrator")); } - $this->validate($request, array("ticketcomment" => "required")); - $ticket = Ticket::where('id', $request->input("ticket_id"))->firstOrFail(); - $ticket->status = "Client Reply"; + $this->validate($request, ['ticketcomment' => 'required']); + $ticket = Ticket::where('id', $request->input('ticket_id'))->firstOrFail(); + $ticket->status = 'Client Reply'; $ticket->update(); - $ticketcomment = TicketComment::create(array( - "ticket_id" => $request->input("ticket_id"), - "user_id" => Auth::user()->id, - "ticketcomment" => $request->input("ticketcomment"), - "message" => $request->input("message") - )); + $ticketcomment = TicketComment::create([ + 'ticket_id' => $request->input('ticket_id'), + 'user_id' => Auth::user()->id, + 'ticketcomment' => $request->input('ticketcomment'), + 'message' => $request->input('message'), + ]); $user = Auth::user(); $admin = User::where('role', 'admin')->orWhere('role', 'mod')->get(); - $newmessage = $request->input("ticketcomment"); + $newmessage = $request->input('ticketcomment'); Notification::send($admin, new AdminReplyNotification($ticket, $user, $newmessage)); + return redirect()->back()->with('success', __('Your comment has been submitted')); } + public function close($ticket_id) + { + $ticket = Ticket::where('user_id', Auth::user()->id)->where("ticket_id", $ticket_id)->firstOrFail(); + $ticket->status = "Closed"; + $ticket->save(); + return redirect()->back()->with('success', __('A ticket has been closed, ID: #') . $ticket->ticket_id); + } public function dataTable() { - $query = Ticket::where("user_id", Auth::user()->id)->get(); + $query = Ticket::where('user_id', Auth::user()->id)->get(); return datatables($query) ->addColumn('category', function (Ticket $tickets) { return $tickets->ticketcategory->name; }) ->editColumn('title', function (Ticket $tickets) { - return '' . "#" . $tickets->ticket_id . " - " . $tickets->title . ''; + return ''.'#'.$tickets->ticket_id.' - '.htmlspecialchars($tickets->title).''; }) ->editColumn('status', function (Ticket $tickets) { switch ($tickets->status) { case 'Open': $badgeColor = 'badge-success'; - break; + break; case 'Closed': $badgeColor = 'badge-danger'; break; @@ -120,12 +139,27 @@ public function dataTable() break; } - return '' . $tickets->status . ''; + return ''.$tickets->status.''; + }) + ->editColumn('priority', function (Ticket $tickets) { + return __($tickets->priority); }) ->editColumn('updated_at', function (Ticket $tickets) { return $tickets->updated_at ? $tickets->updated_at->diffForHumans() : ''; }) - ->rawColumns(['category', 'title', 'status', 'updated_at']) + ->addColumn('actions', function (Ticket $tickets) { + return ' + +
+ '.csrf_field().' + '.method_field('POST').' + +
+ + + '; + }) + ->rawColumns(['category', 'title', 'status', 'updated_at', "actions"]) ->make(true); } } diff --git a/app/Http/Controllers/TranslationController.php b/app/Http/Controllers/TranslationController.php index d771f8f22..d486902ff 100644 --- a/app/Http/Controllers/TranslationController.php +++ b/app/Http/Controllers/TranslationController.php @@ -8,16 +8,15 @@ class TranslationController extends Controller { /** - * * Change session locale - * @param Request $request + * + * @param Request $request * @return Response */ public function changeLocale(Request $request) { Session::put('locale', $request->inputLocale); + return redirect()->back(); } - - } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 2ee71131e..3e372e091 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -22,7 +22,7 @@ class Kernel extends HttpKernel protected $middleware = [ // \App\Http\Middleware\TrustHosts::class, \App\Http\Middleware\TrustProxies::class, - \Fruitcake\Cors\HandleCors::class, + \Illuminate\Http\Middleware\HandleCors::class, \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, @@ -39,7 +39,6 @@ class Kernel extends HttpKernel \App\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, \Illuminate\Session\Middleware\StartSession::class, - // \Illuminate\Session\Middleware\AuthenticateSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class, \App\Http\Middleware\VerifyCsrfToken::class, \Illuminate\Routing\Middleware\SubstituteBindings::class, @@ -51,7 +50,7 @@ class Kernel extends HttpKernel 'api' => [ 'throttle:api', \Illuminate\Routing\Middleware\SubstituteBindings::class, - GlobalNames::class + GlobalNames::class, ], ]; @@ -65,6 +64,7 @@ class Kernel extends HttpKernel protected $routeMiddleware = [ 'auth' => \App\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, + 'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class, 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, @@ -75,6 +75,6 @@ class Kernel extends HttpKernel 'admin' => isAdmin::class, 'moderator' => isMod::class, 'api.token' => ApiAuthToken::class, - 'checkSuspended' => CheckSuspended::class + 'checkSuspended' => CheckSuspended::class, ]; } diff --git a/app/Http/Middleware/ApiAuthToken.php b/app/Http/Middleware/ApiAuthToken.php index 8063e2efd..1881230f8 100644 --- a/app/Http/Middleware/ApiAuthToken.php +++ b/app/Http/Middleware/ApiAuthToken.php @@ -11,18 +11,23 @@ class ApiAuthToken /** * Handle an incoming request. * - * @param Request $request - * @param Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle(Request $request, Closure $next) { - if (empty($request->bearerToken())) return response()->json(['message' => 'Missing Authorization header'], 403); + if (empty($request->bearerToken())) { + return response()->json(['message' => 'Missing Authorization header'], 403); + } $token = ApplicationApi::find($request->bearerToken()); - if (is_null($token)) return response()->json(['message' => 'Invalid Authorization token'], 401); + if (is_null($token)) { + return response()->json(['message' => 'Invalid Authorization token'], 401); + } $token->updateLastUsed(); + return $next($request); } } diff --git a/app/Http/Middleware/CheckSuspended.php b/app/Http/Middleware/CheckSuspended.php index 59fcc6148..60cda0af6 100644 --- a/app/Http/Middleware/CheckSuspended.php +++ b/app/Http/Middleware/CheckSuspended.php @@ -23,6 +23,7 @@ public function handle(Request $request, Closure $next) return redirect()->route('login')->withMessage($message); } + return $next($request); } } diff --git a/app/Http/Middleware/GlobalNames.php b/app/Http/Middleware/GlobalNames.php index fbff55944..4874a2f61 100644 --- a/app/Http/Middleware/GlobalNames.php +++ b/app/Http/Middleware/GlobalNames.php @@ -2,8 +2,6 @@ namespace App\Http\Middleware; -use App\Models\Configuration; -use App\Models\Settings; use Closure; use Illuminate\Http\Request; @@ -12,15 +10,15 @@ class GlobalNames /** * Handle an incoming request. * - * @param Request $request - * @param Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle(Request $request, Closure $next) { define('CREDITS_DISPLAY_NAME', config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME', 'Credits')); - $unsupported_lang_array = explode(',', config("app.unsupported_locales")); + $unsupported_lang_array = explode(',', config('app.unsupported_locales')); $unsupported_lang_array = array_map('strtolower', $unsupported_lang_array); define('UNSUPPORTED_LANGS', $unsupported_lang_array); diff --git a/app/Http/Middleware/LastSeen.php b/app/Http/Middleware/LastSeen.php index 567c1f396..a6667b64b 100644 --- a/app/Http/Middleware/LastSeen.php +++ b/app/Http/Middleware/LastSeen.php @@ -3,7 +3,6 @@ namespace App\Http\Middleware; use Closure; -use DateTime; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; @@ -12,17 +11,17 @@ class LastSeen /** * Handle an incoming request. * - * @param Request $request - * @param Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle(Request $request, Closure $next) { - if (env('APP_ENV' , 'local') == 'local'){ + if (env('APP_ENV', 'local') == 'local') { return $next($request); } - if (!Auth::check()) { + if (! Auth::check()) { return $next($request); } @@ -32,7 +31,7 @@ public function handle(Request $request, Closure $next) Auth::user()->update([ 'last_seen' => now(), - 'ip' => $request->ip() + 'ip' => $request->ip(), ]); return $next($request); diff --git a/app/Http/Middleware/SetLocale.php b/app/Http/Middleware/SetLocale.php index bd5188b00..64174677c 100644 --- a/app/Http/Middleware/SetLocale.php +++ b/app/Http/Middleware/SetLocale.php @@ -2,7 +2,6 @@ namespace App\Http\Middleware; -use App\Models\Settings; use Closure; use Illuminate\Http\Request; use Illuminate\Support\Facades\App; @@ -10,27 +9,25 @@ class SetLocale { - /** - * * Handle an incoming request. * - * @param Request $request - * @param Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle($request, Closure $next) { if (Session::has('locale')) { - $locale = Session::get('locale', config("SETTINGS::LOCALE:DEFAULT")); + $locale = Session::get('locale', config('SETTINGS::LOCALE:DEFAULT')); } else { - if (config("SETTINGS::LOCALE:DYNAMIC") !== "true") { - $locale = config("SETTINGS::LOCALE:DEFAULT"); + if (config('SETTINGS::LOCALE:DYNAMIC') !== 'true') { + $locale = config('SETTINGS::LOCALE:DEFAULT'); } else { $locale = substr($request->server('HTTP_ACCEPT_LANGUAGE'), 0, 2); - if (!in_array($locale, explode(',', config("SETTINGS::LOCALE:AVAILABLE")))) { - $locale = config("SETTINGS::LOCALE:DEFAULT"); + if (! in_array($locale, explode(',', config('SETTINGS::LOCALE:AVAILABLE')))) { + $locale = config('SETTINGS::LOCALE:DEFAULT'); } } } diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index 5a50e7b5c..88cadcaaf 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -9,9 +9,10 @@ class TrimStrings extends Middleware /** * The names of the attributes that should not be trimmed. * - * @var array + * @var array */ protected $except = [ + 'current_password', 'password', 'password_confirmation', ]; diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index a3b6aef90..3391630ec 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -2,7 +2,7 @@ namespace App\Http\Middleware; -use Fideloper\Proxy\TrustProxies as Middleware; +use Illuminate\Http\Middleware\TrustProxies as Middleware; use Illuminate\Http\Request; class TrustProxies extends Middleware @@ -10,7 +10,7 @@ class TrustProxies extends Middleware /** * The trusted proxies for this application. * - * @var array|string|null + * @var array|string|null */ protected $proxies; @@ -19,5 +19,10 @@ class TrustProxies extends Middleware * * @var int */ - protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB; + protected $headers = + Request::HEADER_X_FORWARDED_FOR | + Request::HEADER_X_FORWARDED_HOST | + Request::HEADER_X_FORWARDED_PORT | + Request::HEADER_X_FORWARDED_PROTO | + Request::HEADER_X_FORWARDED_AWS_ELB; } diff --git a/app/Http/Middleware/ValidateSignature.php b/app/Http/Middleware/ValidateSignature.php new file mode 100644 index 000000000..093bf64af --- /dev/null +++ b/app/Http/Middleware/ValidateSignature.php @@ -0,0 +1,22 @@ + + */ + protected $except = [ + // 'fbclid', + // 'utm_campaign', + // 'utm_content', + // 'utm_medium', + // 'utm_source', + // 'utm_term', + ]; +} diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 45cfc5988..5fbf7e81d 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -2,7 +2,10 @@ namespace App\Http\Middleware; +use App\Helpers\ExtensionHelper; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; +use Illuminate\Contracts\Encryption\Encrypter; +use Illuminate\Contracts\Foundation\Application; class VerifyCsrfToken extends Middleware { @@ -11,7 +14,12 @@ class VerifyCsrfToken extends Middleware * * @var array */ - protected $except = [ - 'payment/StripeWebhooks' - ]; + protected $except = []; + + public function __construct(Application $app, Encrypter $encrypter) + { + $this->app = $app; + $this->encrypter = $encrypter; + $this->except = ExtensionHelper::getAllCsrfIgnoredRoutes(); + } } diff --git a/app/Http/Middleware/isAdmin.php b/app/Http/Middleware/isAdmin.php index 3c839d50a..3dbb49574 100644 --- a/app/Http/Middleware/isAdmin.php +++ b/app/Http/Middleware/isAdmin.php @@ -12,8 +12,8 @@ class isAdmin /** * Handle an incoming request. * - * @param Request $request - * @param Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle(Request $request, Closure $next) diff --git a/app/Http/Middleware/isMod.php b/app/Http/Middleware/isMod.php index 4e8b9b79f..c9120719c 100644 --- a/app/Http/Middleware/isMod.php +++ b/app/Http/Middleware/isMod.php @@ -12,8 +12,8 @@ class isMod /** * Handle an incoming request. * - * @param Request $request - * @param Closure $next + * @param Request $request + * @param Closure $next * @return mixed */ public function handle(Request $request, Closure $next) diff --git a/app/Listeners/CreateInvoice.php b/app/Listeners/CreateInvoice.php new file mode 100644 index 000000000..3b4476574 --- /dev/null +++ b/app/Listeners/CreateInvoice.php @@ -0,0 +1,26 @@ +createInvoice($event->payment, $event->shopProduct); + } + } +} diff --git a/app/Listeners/UnsuspendServers.php b/app/Listeners/UnsuspendServers.php index 7f75364c3..587cd84fc 100644 --- a/app/Listeners/UnsuspendServers.php +++ b/app/Listeners/UnsuspendServers.php @@ -4,7 +4,6 @@ use App\Events\UserUpdateCreditsEvent; use App\Models\Server; -use App\Models\Settings; use Exception; use Illuminate\Contracts\Queue\ShouldQueue; @@ -13,8 +12,9 @@ class UnsuspendServers implements ShouldQueue /** * Handle the event. * - * @param UserUpdateCreditsEvent $event + * @param UserUpdateCreditsEvent $event * @return void + * * @throws Exception */ public function handle(UserUpdateCreditsEvent $event) @@ -22,7 +22,9 @@ public function handle(UserUpdateCreditsEvent $event) if ($event->user->credits > config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', 50)) { /** @var Server $server */ foreach ($event->user->servers as $server) { - if ($server->isSuspended()) $server->unSuspend(); + if ($server->isSuspended()) { + $server->unSuspend(); + } } } } diff --git a/app/Listeners/UserPayment.php b/app/Listeners/UserPayment.php new file mode 100644 index 000000000..be9470874 --- /dev/null +++ b/app/Listeners/UserPayment.php @@ -0,0 +1,82 @@ +user; + $shopProduct = $event->shopProduct; + + // only update user if payment is paid + if ($event->payment->status != "paid") { + return; + } + + //update server limit + if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0 && $user->server_limit < config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) { + $user->update(['server_limit' => config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]); + } + + //update User with bought item + if ($shopProduct->type == "Credits") { + $user->increment('credits', $shopProduct->quantity); + } elseif ($shopProduct->type == "Server slots") { + $user->increment('server_limit', $shopProduct->quantity); + } + + //give referral commission always + if ((config("SETTINGS::REFERRAL:MODE") == "commission" || config("SETTINGS::REFERRAL:MODE") == "both") && $shopProduct->type == "Credits" && config("SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION") == "true") { + if ($ref_user = DB::table("user_referrals")->where('registered_user_id', '=', $user->id)->first()) { + $ref_user = User::findOrFail($ref_user->referral_id); + $increment = number_format($shopProduct->quantity * (PartnerDiscount::getCommission($ref_user->id)) / 100, 0, "", ""); + $ref_user->increment('credits', $increment); + + //LOGS REFERRALS IN THE ACTIVITY LOG + activity() + ->performedOn($user) + ->causedBy($ref_user) + ->log('gained ' . $increment . ' ' . config("SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME") . ' for commission-referral of ' . $user->name . ' (ID:' . $user->id . ')'); + } + } + //update role give Referral-reward + if ($user->role == 'member') { + $user->update(['role' => 'client']); + + //give referral commission only on first purchase + if ((config("SETTINGS::REFERRAL:MODE") == "commission" || config("SETTINGS::REFERRAL:MODE") == "both") && $shopProduct->type == "Credits" && config("SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION") == "false") { + if ($ref_user = DB::table("user_referrals")->where('registered_user_id', '=', $user->id)->first()) { + $ref_user = User::findOrFail($ref_user->referral_id); + $increment = number_format($shopProduct->quantity * (PartnerDiscount::getCommission($ref_user->id)) / 100, 0, "", ""); + $ref_user->increment('credits', $increment); + + //LOGS REFERRALS IN THE ACTIVITY LOG + activity() + ->performedOn($user) + ->causedBy($ref_user) + ->log('gained ' . $increment . ' ' . config("SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME") . ' for commission-referral of ' . $user->name . ' (ID:' . $user->id . ')'); + } + } + } + + // LOGS PAYMENT IN THE ACTIVITY LOG + activity() + ->performedOn($user) + ->causedBy($user) + ->log('bought ' . $shopProduct->quantity . ' ' . $shopProduct->type . ' for ' . $shopProduct->price . $shopProduct->currency_code); + } +} diff --git a/app/Listeners/Verified.php b/app/Listeners/Verified.php index c4932707c..6863e462d 100644 --- a/app/Listeners/Verified.php +++ b/app/Listeners/Verified.php @@ -17,12 +17,12 @@ public function __construct() /** * Handle the event. * - * @param object $event + * @param object $event * @return void */ public function handle($event) { - if (!$event->user->email_verified_reward) { + if (! $event->user->email_verified_reward) { $event->user->increment('server_limit', config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL')); $event->user->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL')); } diff --git a/app/Models/ApplicationApi.php b/app/Models/ApplicationApi.php index 799cb1102..62a03478e 100644 --- a/app/Models/ApplicationApi.php +++ b/app/Models/ApplicationApi.php @@ -10,13 +10,15 @@ class ApplicationApi extends Model { use HasFactory; - protected $fillable = ['token', 'memo' , 'last_used']; + protected $fillable = ['token', 'memo', 'last_used']; protected $primaryKey = 'token'; public $incrementing = false; - protected $dates = ['last_used']; + protected $casts = [ + 'last_used' => 'datetime', + ]; public static function boot() { @@ -29,7 +31,8 @@ public static function boot() }); } - public function updateLastUsed(){ + public function updateLastUsed() + { $this->update(['last_used' => now()]); } } diff --git a/app/Models/DiscordUser.php b/app/Models/DiscordUser.php index ab53dba7b..03051ea32 100644 --- a/app/Models/DiscordUser.php +++ b/app/Models/DiscordUser.php @@ -11,18 +11,18 @@ class DiscordUser extends Model use HasFactory; protected $fillable = [ - "id", - "user_id", - "username", - "avatar", - "discriminator", - "public_flags", - "flags", - "locale", - "mfa_enabled", - "premium_type", - "email", - "verified", + 'id', + 'user_id', + 'username', + 'avatar', + 'discriminator', + 'public_flags', + 'flags', + 'locale', + 'mfa_enabled', + 'premium_type', + 'email', + 'verified', ]; public $incrementing = false; @@ -30,14 +30,16 @@ class DiscordUser extends Model /** * @return BelongsTo */ - public function user(){ + public function user() + { return $this->belongsTo(User::class); } /** * @return string */ - public function getAvatar(){ - return "https://cdn.discordapp.com/avatars/" . $this->id . "/" . $this->avatar . ".png"; + public function getAvatar() + { + return 'https://cdn.discordapp.com/avatars/'.$this->id.'/'.$this->avatar.'.png'; } } diff --git a/app/Models/Egg.php b/app/Models/Egg.php index 435b8cb0d..23bf34efc 100644 --- a/app/Models/Egg.php +++ b/app/Models/Egg.php @@ -61,8 +61,8 @@ public static function syncEggs() $array['environment'] = json_encode([$environment]); self::query()->updateOrCreate([ - 'id' => $array['id'] - ], array_diff_key($array, array_flip(["id"])) + 'id' => $array['id'], + ], array_diff_key($array, array_flip(['id'])) ); } @@ -72,8 +72,9 @@ public static function syncEggs() /** * @description remove eggs that have been deleted on pterodactyl - * @param Nest $nest - * @param array $eggs + * + * @param Nest $nest + * @param array $eggs */ private static function removeDeletedEggs(Nest $nest, array $eggs): void { @@ -82,7 +83,9 @@ private static function removeDeletedEggs(Nest $nest, array $eggs): void }, $eggs); $nest->eggs()->each(function (Egg $egg) use ($ids) { - if (!in_array($egg->id, $ids)) $egg->delete(); + if (! in_array($egg->id, $ids)) { + $egg->delete(); + } }); } diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index c0618ab5f..b01c3c716 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -12,7 +12,6 @@ class Invoice extends Model protected $fillable = [ 'invoice_name', 'invoice_user', - 'payment_id' + 'payment_id', ]; - } diff --git a/app/Models/Location.php b/app/Models/Location.php index 9066a4d47..a020c73f5 100644 --- a/app/Models/Location.php +++ b/app/Models/Location.php @@ -28,6 +28,7 @@ public static function boot() /** * Sync locations with pterodactyl panel + * * @throws Exception */ public static function syncLocations() @@ -36,21 +37,21 @@ public static function syncLocations() //map response $locations = array_map(function ($val) { - return array( - 'id' => $val['attributes']['id'], - 'name' => $val['attributes']['short'], - 'description' => $val['attributes']['long'] - ); + return [ + 'id' => $val['attributes']['id'], + 'name' => $val['attributes']['short'], + 'description' => $val['attributes']['long'], + ]; }, $locations); //update or create foreach ($locations as $location) { self::query()->updateOrCreate( [ - 'id' => $location['id'] + 'id' => $location['id'], ], [ - 'name' => $location['name'], + 'name' => $location['name'], 'description' => $location['name'], ] ); @@ -61,7 +62,8 @@ public static function syncLocations() /** * @description remove locations that have been deleted on pterodactyl - * @param array $locations + * + * @param array $locations */ private static function removeDeletedLocation(array $locations): void { @@ -70,7 +72,9 @@ private static function removeDeletedLocation(array $locations): void }, $locations); self::all()->each(function (Location $location) use ($ids) { - if (!in_array($location->id, $ids)) $location->delete(); + if (! in_array($location->id, $ids)) { + $location->delete(); + } }); } @@ -78,5 +82,4 @@ public function nodes() { return $this->hasMany(Node::class, 'location_id', 'id'); } - } diff --git a/app/Models/Nest.php b/app/Models/Nest.php index fdc36a941..06c5ce264 100644 --- a/app/Models/Nest.php +++ b/app/Models/Nest.php @@ -36,20 +36,20 @@ public static function syncNests() //map response $nests = array_map(function ($nest) { - return array( - 'id' => $nest['attributes']['id'], - 'name' => $nest['attributes']['name'], + return [ + 'id' => $nest['attributes']['id'], + 'name' => $nest['attributes']['name'], 'description' => $nest['attributes']['description'], - ); + ]; }, $nests); foreach ($nests as $nest) { self::query()->updateOrCreate([ - 'id' => $nest['id'] + 'id' => $nest['id'], ], [ - 'name' => $nest['name'], + 'name' => $nest['name'], 'description' => $nest['description'], - 'disabled' => false + 'disabled' => false, ]); } @@ -58,7 +58,8 @@ public static function syncNests() /** * @description remove nests that have been deleted on pterodactyl - * @param array $nests + * + * @param array $nests */ private static function removeDeletedNests(array $nests): void { @@ -67,7 +68,9 @@ private static function removeDeletedNests(array $nests): void }, $nests); self::all()->each(function (Nest $nest) use ($ids) { - if (!in_array($nest->id, $ids)) $nest->delete(); + if (! in_array($nest->id, $ids)) { + $nest->delete(); + } }); } diff --git a/app/Models/Node.php b/app/Models/Node.php index c0d1ab3e3..01eee0eaa 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -26,7 +26,6 @@ public static function boot() }); } - /** * @throws Exception */ @@ -37,25 +36,25 @@ public static function syncNodes() //map response $nodes = array_map(function ($node) { - return array( - 'id' => $node['attributes']['id'], + return [ + 'id' => $node['attributes']['id'], 'location_id' => $node['attributes']['location_id'], - 'name' => $node['attributes']['name'], + 'name' => $node['attributes']['name'], 'description' => $node['attributes']['description'], - ); + ]; }, $nodes); //update or create foreach ($nodes as $node) { self::query()->updateOrCreate( [ - 'id' => $node['id'] + 'id' => $node['id'], ], [ - 'name' => $node['name'], + 'name' => $node['name'], 'description' => $node['description'], 'location_id' => $node['location_id'], - 'disabled' => false + 'disabled' => false, ]); } @@ -64,7 +63,8 @@ public static function syncNodes() /** * @description remove nodes that have been deleted on pterodactyl - * @param array $nodes + * + * @param array $nodes */ private static function removeDeletedNodes(array $nodes): void { @@ -73,7 +73,9 @@ private static function removeDeletedNodes(array $nodes): void }, $nodes); self::all()->each(function (Node $node) use ($ids) { - if (!in_array($node->id, $ids)) $node->delete(); + if (! in_array($node->id, $ids)) { + $node->delete(); + } }); } diff --git a/app/Models/PartnerDiscount.php b/app/Models/PartnerDiscount.php new file mode 100644 index 000000000..01f93b2d3 --- /dev/null +++ b/app/Models/PartnerDiscount.php @@ -0,0 +1,46 @@ +id)->first()) { + return $partnerDiscount->partner_discount; + } elseif ($ref_user = DB::table('user_referrals')->where('registered_user_id', '=', $user_id ?? Auth::user()->id)->first()) { + if ($partnerDiscount = PartnerDiscount::where('user_id', $ref_user->referral_id)->first()) { + return $partnerDiscount->registered_user_discount; + } + + return 0; + } + + return 0; + } + + public static function getCommission($user_id) + { + if ($partnerDiscount = PartnerDiscount::where('user_id', $user_id)->first()) { + if ($partnerDiscount->referral_system_commission >= 0) { + return $partnerDiscount->referral_system_commission >= 0; + } + } + + return config('SETTINGS::REFERRAL:PERCENTAGE'); + } +} diff --git a/app/Models/Payment.php b/app/Models/Payment.php index df6acb24d..04c328318 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -7,12 +7,10 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use NumberFormatter; -use Spatie\Activitylog\Traits\LogsActivity; class Payment extends Model { use HasFactory; - use LogsActivity; public $incrementing = false; @@ -55,14 +53,14 @@ public function user() } /** - * @param mixed $value - * @param string $locale - * + * @param mixed $value + * @param string $locale * @return float */ public function formatToCurrency($value, $locale = 'en_US') { $formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY); + return $formatter->formatCurrency($value, $this->currency_code); } } diff --git a/app/Models/Product.php b/app/Models/Product.php index 52a37c28c..a31ebf50a 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -7,14 +7,20 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\BelongsToMany; -use Illuminate\Database\Eloquent\Relations\HasMany; +use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\LogsActivity; class Product extends Model { use HasFactory; use LogsActivity; - + public function getActivitylogOptions(): LogOptions + { + return LogOptions::defaults() + -> logOnlyDirty() + -> logOnly(['*']) + -> dontSubmitEmptyLogs(); + } public $incrementing = false; protected $guarded = ['id']; @@ -29,7 +35,7 @@ public static function boot() $product->{$product->getKeyName()} = $client->generateId($size = 21); }); - static::deleting(function(Product $product) { + static::deleting(function (Product $product) { $product->nodes()->detach(); $product->eggs()->detach(); }); @@ -42,12 +48,12 @@ public function getHourlyPrice() public function getDailyPrice() { - return ($this->price / 30); + return $this->price / 30; } public function getWeeklyPrice() { - return ($this->price / 4); + return $this->price / 4; } /** @@ -61,14 +67,16 @@ public function servers() /** * @return BelongsToMany */ - public function eggs() { + public function eggs() + { return $this->belongsToMany(Egg::class); } /** * @return BelongsToMany */ - public function nodes() { + public function nodes() + { return $this->belongsToMany(Node::class); } } diff --git a/app/Models/Server.php b/app/Models/Server.php index 34c992ba7..94365dd47 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -11,17 +11,23 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Http\Client\Response; +use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\LogsActivity; /** * Class Server - * @package App\Models */ class Server extends Model { use HasFactory; use LogsActivity; - + public function getActivitylogOptions(): LogOptions + { + return LogOptions::defaults() + -> logOnlyDirty() + -> logOnly(['*']) + -> dontSubmitEmptyLogs(); + } /** * @var bool */ @@ -41,24 +47,21 @@ class Server extends Model * @var string[] */ protected $fillable = [ - "name", - "description", - "suspended", - "identifier", - "product_id", - "pterodactyl_id", + 'name', + 'description', + 'suspended', + 'identifier', + 'product_id', + 'pterodactyl_id', ]; /** * @var string[] */ - protected $dates = [ - 'suspended' + protected $casts = [ + 'suspended' => 'datetime', ]; - /** - * - */ public static function boot() { parent::boot(); @@ -71,7 +74,7 @@ public static function boot() static::deleting(function (Server $server) { $response = Pterodactyl::client()->delete("/application/servers/{$server->pterodactyl_id}"); - if ($response->failed() && !is_null($server->pterodactyl_id)) { + if ($response->failed() && ! is_null($server->pterodactyl_id)) { //only return error when it's not a 404 error if ($response['errors'][0]['status'] != '404') { throw new Exception($response['errors'][0]['code']); @@ -85,10 +88,9 @@ public static function boot() */ public function isSuspended() { - return !is_null($this->suspended); + return ! is_null($this->suspended); } - /** * @return PromiseInterface|Response */ @@ -98,7 +100,6 @@ public function getPterodactylServer() } /** - * * @throws Exception */ public function suspend() @@ -107,7 +108,7 @@ public function suspend() if ($response->successful()) { $this->update([ - 'suspended' => now() + 'suspended' => now(), ]); } @@ -123,14 +124,13 @@ public function unSuspend() if ($response->successful()) { $this->update([ - 'suspended' => null + 'suspended' => null, ]); } return $this; } - /** * @return HasOne */ @@ -146,5 +146,4 @@ public function user() { return $this->belongsTo(User::class, 'user_id', 'id'); } - } diff --git a/app/Models/Settings.php b/app/Models/Settings.php index 1db90d7af..ccad0f4a4 100644 --- a/app/Models/Settings.php +++ b/app/Models/Settings.php @@ -31,19 +31,20 @@ public static function boot() parent::boot(); static::updated(function (Settings $settings) { - Cache::forget(self::CACHE_TAG .':'. $settings->key); + Cache::forget(self::CACHE_TAG.':'.$settings->key); }); } /** - * @param string $key + * @param string $key * @param $default * @return mixed */ public static function getValueByKey(string $key, $default = null) { - return Cache::rememberForever(self::CACHE_TAG .':'. $key, function () use ($default, $key) { + return Cache::rememberForever(self::CACHE_TAG.':'.$key, function () use ($default, $key) { $settings = self::find($key); + return $settings ? $settings->value : $default; }); } diff --git a/app/Models/ShopProduct.php b/app/Models/ShopProduct.php index 4d158be84..cfe3f7838 100644 --- a/app/Models/ShopProduct.php +++ b/app/Models/ShopProduct.php @@ -5,12 +5,19 @@ use Hidehalo\Nanoid\Client; use Illuminate\Database\Eloquent\Model; use NumberFormatter; +use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\LogsActivity; -use App\Models\Configuration; class ShopProduct extends Model { use LogsActivity; + public function getActivitylogOptions(): LogOptions + { + return LogOptions::defaults() + -> logOnlyDirty() + -> logOnly(['*']) + -> dontSubmitEmptyLogs(); + } /** * @var bool */ @@ -20,13 +27,13 @@ class ShopProduct extends Model * @var string[] */ protected $fillable = [ - "type", - "price", - "description", - "display", - "currency_code", - "quantity", - "disabled", + 'type', + 'price', + 'description', + 'display', + 'currency_code', + 'quantity', + 'disabled', ]; public static function boot() @@ -41,14 +48,14 @@ public static function boot() } /** - * @param mixed $value - * @param string $locale - * + * @param mixed $value + * @param string $locale * @return float */ public function formatToCurrency($value, $locale = 'en_US') { $formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY); + return $formatter->formatCurrency($value, $this->currency_code); } @@ -59,10 +66,16 @@ public function formatToCurrency($value, $locale = 'en_US') */ public function getTaxPercent() { - $tax = config("SETTINGS::PAYMENTS:SALES_TAX"); + $tax = config('SETTINGS::PAYMENTS:SALES_TAX'); + return $tax < 0 ? 0 : $tax; } + public function getPriceAfterDiscount() + { + return number_format($this->price - ($this->price * PartnerDiscount::getDiscount() / 100), 2); + } + /** * @description Returns the tax as Number * @@ -70,7 +83,7 @@ public function getTaxPercent() */ public function getTaxValue() { - return number_format($this->price * $this->getTaxPercent() / 100, 2); + return number_format($this->getPriceAfterDiscount() * $this->getTaxPercent() / 100, 2); } /** @@ -80,6 +93,6 @@ public function getTaxValue() */ public function getTotalPrice() { - return number_format($this->price + $this->getTaxValue(), 2); + return number_format($this->getPriceAfterDiscount() + $this->getTaxValue(), 2); } } diff --git a/app/Models/Ticket.php b/app/Models/Ticket.php index 16f548a91..84810cf7f 100644 --- a/app/Models/Ticket.php +++ b/app/Models/Ticket.php @@ -3,19 +3,36 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; +use Spatie\Activitylog\LogOptions; +use Spatie\Activitylog\Traits\LogsActivity; + +class Ticket extends Model +{ + use LogsActivity; -class Ticket extends Model { protected $fillable = [ - 'user_id', 'ticketcategory_id', 'ticket_id', 'title', 'priority', 'message', 'status', 'server' + 'user_id', 'ticketcategory_id', 'ticket_id', 'title', 'priority', 'message', 'status', 'server', ]; + public function getActivitylogOptions(): LogOptions + { + return LogOptions::defaults() + -> logOnlyDirty() + -> logOnly(['*']) + -> dontSubmitEmptyLogs(); + } - public function ticketcategory(){ - return $this->belongsTo(TicketCategory::class);} + public function ticketcategory() + { + return $this->belongsTo(TicketCategory::class); + } - public function ticketcomments(){ - return $this->hasMany(TicketComment::class);} + public function ticketcomments() + { + return $this->hasMany(TicketComment::class); + } - public function user(){ - return $this->belongsTo(User::class);} -} - \ No newline at end of file + public function user() + { + return $this->belongsTo(User::class); + } +} diff --git a/app/Models/TicketBlacklist.php b/app/Models/TicketBlacklist.php index 21ea1ff42..4a7290e7c 100644 --- a/app/Models/TicketBlacklist.php +++ b/app/Models/TicketBlacklist.php @@ -4,14 +4,14 @@ use Illuminate\Database\Eloquent\Model; -class TicketBlacklist extends Model { +class TicketBlacklist extends Model +{ protected $fillable = [ - 'user_id', 'status', 'reason' + 'user_id', 'status', 'reason', ]; public function user() { return $this->belongsTo(User::class, 'user_id', 'id'); } -} - \ No newline at end of file +} diff --git a/app/Models/TicketCategory.php b/app/Models/TicketCategory.php index 8301a108a..d261f4c18 100644 --- a/app/Models/TicketCategory.php +++ b/app/Models/TicketCategory.php @@ -4,10 +4,12 @@ use Illuminate\Database\Eloquent\Model; -class TicketCategory extends Model { +class TicketCategory extends Model +{ protected $fillable = ['name']; - - public function tickets(){ - return $this->hasMany(Ticket::class);} + + public function tickets() + { + return $this->hasMany(Ticket::class); + } } - \ No newline at end of file diff --git a/app/Models/TicketComment.php b/app/Models/TicketComment.php index c44a5bf1d..3fcf1a857 100644 --- a/app/Models/TicketComment.php +++ b/app/Models/TicketComment.php @@ -4,18 +4,24 @@ use Illuminate\Database\Eloquent\Model; -class TicketComment extends Model { -protected $fillable = [ - 'ticket_id', 'user_id', 'ticketcomment' -]; +class TicketComment extends Model +{ + protected $fillable = [ + 'ticket_id', 'user_id', 'ticketcomment', + ]; - public function ticketcategory(){ - return $this->belongsTo(TicketCategory::class);} + public function ticketcategory() + { + return $this->belongsTo(TicketCategory::class); + } - public function ticket(){ - return $this->belongsTo(Ticket::class);} + public function ticket() + { + return $this->belongsTo(Ticket::class); + } - public function user(){ - return $this->belongsTo(User::class);} + public function user() + { + return $this->belongsTo(User::class); + } } - \ No newline at end of file diff --git a/app/Models/UsefulLink.php b/app/Models/UsefulLink.php index ba8eeb15a..4d788e0d2 100644 --- a/app/Models/UsefulLink.php +++ b/app/Models/UsefulLink.php @@ -15,6 +15,6 @@ class UsefulLink extends Model 'icon', 'title', 'link', - 'description' + 'description', ]; } diff --git a/app/Models/User.php b/app/Models/User.php index 31bb29e59..328b7c114 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -12,12 +12,12 @@ use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\CausesActivity; use Spatie\Activitylog\Traits\LogsActivity; /** * Class User - * @package App\Models */ class User extends Authenticatable implements MustVerifyEmail { @@ -38,7 +38,7 @@ class User extends Authenticatable implements MustVerifyEmail 'server_limit', 'last_seen', 'ip', - 'pterodactyl_id' + 'pterodactyl_id', ]; /** @@ -60,7 +60,7 @@ class User extends Authenticatable implements MustVerifyEmail 'discord_verified_at', 'avatar', 'suspended', - 'referral_code' + 'referral_code', ]; /** @@ -85,9 +85,6 @@ class User extends Authenticatable implements MustVerifyEmail 'server_limit' => 'float', ]; - /** - * - */ public static function boot() { parent::boot(); @@ -119,7 +116,6 @@ public static function boot() $user->vouchers()->detach(); - $user->discordUser()->delete(); Pterodactyl::client()->delete("/application/users/{$user->pterodactyl_id}"); @@ -174,9 +170,6 @@ public function discordUser() return $this->hasOne(DiscordUser::class); } - /** - * - */ public function sendEmailVerificationNotification() { $this->notify(new QueuedVerifyEmail); @@ -199,7 +192,6 @@ public function isSuspended() } /** - * * @throws Exception */ public function suspend() @@ -209,7 +201,7 @@ public function suspend() } $this->update([ - 'suspended' => true + 'suspended' => true, ]); return $this; @@ -227,7 +219,7 @@ public function unSuspend() } $this->update([ - 'suspended' => false + 'suspended' => false, ]); return $this; @@ -256,8 +248,7 @@ public function getAvatar() // $avatar = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email))); // } - return "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->email))); - + return 'https://www.gravatar.com/avatar/'.md5(strtolower(trim($this->email))); } /** @@ -279,9 +270,14 @@ public function creditUsage() public function getVerifiedStatus() { $status = ''; - if ($this->hasVerifiedEmail()) $status .= 'email '; - if ($this->discordUser()->exists()) $status .= 'discord'; + if ($this->hasVerifiedEmail()) { + $status .= 'email '; + } + if ($this->discordUser()->exists()) { + $status .= 'discord'; + } $status = str_replace(' ', '/', $status); + return $status; } @@ -298,4 +294,13 @@ public function reVerifyEmail() 'email_verified_at' => null, ])->save(); } + + public function getActivitylogOptions(): LogOptions + { + return LogOptions::defaults() + -> logOnly(['role', 'name', 'server_limit', 'pterodactyl_id', 'email']) + -> logOnlyDirty() + -> dontSubmitEmptyLogs(); + } + } diff --git a/app/Models/Voucher.php b/app/Models/Voucher.php index 17548c4f9..bab5d26d3 100644 --- a/app/Models/Voucher.php +++ b/app/Models/Voucher.php @@ -6,16 +6,22 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; +use Spatie\Activitylog\LogOptions; use Spatie\Activitylog\Traits\LogsActivity; /** * Class Voucher - * @package App\Models */ class Voucher extends Model { use HasFactory, LogsActivity; - + public function getActivitylogOptions(): LogOptions + { + return LogOptions::defaults() + -> logOnlyDirty() + -> logOnly(['*']) + -> dontSubmitEmptyLogs(); + } /** * @var string[] */ @@ -27,19 +33,15 @@ class Voucher extends Model 'expires_at', ]; - protected $dates = [ - 'expires_at' - ]; - /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [ + 'expires_at' => 'datetime', 'credits' => 'float', - 'uses' => 'integer' - ]; + 'uses' => 'integer', ]; protected $appends = ['used', 'status']; @@ -59,9 +61,6 @@ public function getStatusAttribute() return $this->getStatus(); } - /** - * - */ public static function boot() { parent::boot(); @@ -84,17 +83,22 @@ public function users() */ public function getStatus() { - if ($this->users()->count() >= $this->uses) return 'USES_LIMIT_REACHED'; - if (!is_null($this->expires_at)) { - if ($this->expires_at->isPast()) return __('EXPIRED'); + if ($this->users()->count() >= $this->uses) { + return 'USES_LIMIT_REACHED'; + } + if (! is_null($this->expires_at)) { + if ($this->expires_at->isPast()) { + return __('EXPIRED'); + } } return __('VALID'); } /** - * @param User $user + * @param User $user * @return float + * * @throws Exception */ public function redeem(User $user) @@ -111,7 +115,7 @@ public function redeem(User $user) } /** - * @param User $user + * @param User $user * @return null */ private function logRedeem(User $user) diff --git a/app/Notifications/ConfirmPaymentNotification.php b/app/Notifications/ConfirmPaymentNotification.php index 37638c158..7d6ddd364 100644 --- a/app/Notifications/ConfirmPaymentNotification.php +++ b/app/Notifications/ConfirmPaymentNotification.php @@ -10,7 +10,6 @@ class ConfirmPaymentNotification extends Notification implements ShouldQueue { - //THIS IS BASICALLY NOT USED ANYMORE WITH INVOICENOTIFICATION IN PLACE use Queueable; @@ -48,20 +47,20 @@ public function toMail($notifiable) { return (new MailMessage) ->subject(__('Payment Confirmation')) - ->markdown('mail.payment.confirmed' , ['payment' => $this->payment]); + ->markdown('mail.payment.confirmed', ['payment' => $this->payment]); } /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ - 'title' => __("Payment Confirmed!"), - 'content' => __("Payment Confirmed!"), + 'title' => __('Payment Confirmed!'), + 'content' => __('Payment Confirmed!'), ]; } } diff --git a/app/Notifications/DynamicNotification.php b/app/Notifications/DynamicNotification.php index 6e24c3291..b61b053b5 100644 --- a/app/Notifications/DynamicNotification.php +++ b/app/Notifications/DynamicNotification.php @@ -6,27 +6,30 @@ use Illuminate\Notifications\Notification; class DynamicNotification extends Notification - { use Queueable; + /** * @var array */ private $via; + /** * @var array */ private $database; + /** * @var MailMessage */ private $mail; + /** * Create a new notification instance. * - * @param array $via - * @param array $database - * @param MailMessage $mail + * @param array $via + * @param array $database + * @param MailMessage $mail */ public function __construct($via, $database, $mail) { @@ -38,7 +41,7 @@ public function __construct($via, $database, $mail) /** * Get the notification's delivery channels. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function via() @@ -50,10 +53,11 @@ public function toMail() { return $this->mail; } + /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray() diff --git a/app/Notifications/InvoiceNotification.php b/app/Notifications/InvoiceNotification.php index 75fcd5ac2..af7c5fa98 100644 --- a/app/Notifications/InvoiceNotification.php +++ b/app/Notifications/InvoiceNotification.php @@ -10,7 +10,6 @@ use LaravelDaily\Invoices\Invoice; class InvoiceNotification extends Notification - { use Queueable; @@ -20,13 +19,15 @@ class InvoiceNotification extends Notification * * @var invoice */ private $invoice; + private $user; + private $payment; /** * Create a new notification instance. * - * @param Invoice $invoice + * @param Invoice $invoice */ public function __construct(Invoice $invoice, User $user, Payment $payment) { @@ -38,7 +39,7 @@ public function __construct(Invoice $invoice, User $user, Payment $payment) /** * Get the notification's delivery channels. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function via($notifiable) @@ -49,7 +50,7 @@ public function via($notifiable) /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return MailMessage */ public function toMail($notifiable) @@ -57,13 +58,13 @@ public function toMail($notifiable) return (new MailMessage) ->subject(__('Your Payment was successful!')) ->greeting(__('Hello').',') - ->line(__("Your payment was processed successfully!")) - ->line(__('Status').': ' . $this->payment->status) - ->line(__('Price').': ' . $this->payment->formatToCurrency($this->payment->total_price)) - ->line(__('Type').': ' . $this->payment->type) - ->line(__('Amount').': ' . $this->payment->amount) - ->line(__('Balance').': ' . number_format($this->user->credits,2)) - ->line(__('User ID').': ' . $this->payment->user_id) - ->attach(storage_path('app/invoice/' . $this->user->id . '/' . now()->format('Y') . '/' . $this->invoice->filename)); + ->line(__('Your payment was processed successfully!')) + ->line(__('Status').': '.$this->payment->status) + ->line(__('Price').': '.$this->payment->formatToCurrency($this->payment->total_price)) + ->line(__('Type').': '.$this->payment->type) + ->line(__('Amount').': '.$this->payment->amount) + ->line(__('Balance').': '.number_format($this->user->credits, 2)) + ->line(__('User ID').': '.$this->payment->user_id) + ->attach(storage_path('app/invoice/'.$this->user->id.'/'.now()->format('Y').'/'.$this->invoice->filename)); } } diff --git a/app/Notifications/ReferralNotification.php b/app/Notifications/ReferralNotification.php index 1f48df377..dec1ea0e7 100644 --- a/app/Notifications/ReferralNotification.php +++ b/app/Notifications/ReferralNotification.php @@ -5,12 +5,11 @@ use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; -use Illuminate\Support\Facades\Auth; class ReferralNotification extends Notification - { use Queueable; + /** * @var User */ @@ -19,7 +18,7 @@ class ReferralNotification extends Notification /** * Create a new notification instance. * - * @param User $user + * @param User $user */ public function __construct(int $user, int $ref_user) { @@ -30,7 +29,7 @@ public function __construct(int $user, int $ref_user) /** * Get the notification's delivery channels. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function via($notifiable) @@ -41,19 +40,19 @@ public function via($notifiable) /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ - 'title' => __("Someone registered using your Code!"), - 'content' => " -

You received ".config('SETTINGS::REFERRAL::REWARD')." ".config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME')."

-

because ".$this->ref_user->name." registered with your Referral-Code!

+ 'title' => __('Someone registered using your Code!'), + 'content' => ' +

You received '.config('SETTINGS::REFERRAL::REWARD').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').'

+

because '.$this->ref_user->name.' registered with your Referral-Code!

Thank you very much for supporting us!.

-

".config('app.name', 'Laravel')."

- ", +

'.config('app.name', 'Laravel').'

+ ', ]; } } diff --git a/app/Notifications/ServerCreationError.php b/app/Notifications/ServerCreationError.php index 8c24c8c04..4f9bcc580 100644 --- a/app/Notifications/ServerCreationError.php +++ b/app/Notifications/ServerCreationError.php @@ -3,14 +3,13 @@ namespace App\Notifications; use App\Models\Server; -use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Notifications\Notification; class ServerCreationError extends Notification - { use Queueable; + /** * @var Server */ @@ -19,7 +18,7 @@ class ServerCreationError extends Notification /** * Create a new notification instance. * - * @param Server $server + * @param Server $server */ public function __construct(Server $server) { @@ -29,7 +28,7 @@ public function __construct(Server $server) /** * Get the notification's delivery channels. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function via($notifiable) @@ -40,19 +39,19 @@ public function via($notifiable) /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ - 'title' => __("Server Creation Error"), + 'title' => __('Server Creation Error'), 'content' => "

Hello {$this->server->User->name}, An unexpected error has occurred...

There was a problem creating your server on our pterodactyl panel. There are likely no allocations or rooms left on the selected node. Please contact one of our support members through our discord server to get this resolved asap!

We thank you for your patience and our deepest apologies for this inconvenience.

-

".config('app.name', 'Laravel')."

- ", +

".config('app.name', 'Laravel').'

+ ', ]; } } diff --git a/app/Notifications/ServersSuspendedNotification.php b/app/Notifications/ServersSuspendedNotification.php index c6ed279bf..a9ea0612e 100644 --- a/app/Notifications/ServersSuspendedNotification.php +++ b/app/Notifications/ServersSuspendedNotification.php @@ -29,7 +29,7 @@ public function __construct() */ public function via($notifiable) { - return ['mail' , 'database']; + return ['mail', 'database']; } /** @@ -43,7 +43,7 @@ public function toMail($notifiable) return (new MailMessage) ->subject(__('Your servers have been suspended!')) ->greeting(__('Your servers have been suspended!')) - ->line(__("To automatically re-enable your server/s, you need to purchase more credits.")) + ->line(__('To automatically re-enable your server/s, you need to purchase more credits.')) ->action(__('Purchase credits'), route('store.index')) ->line(__('If you have any questions please let us know.')); } @@ -57,13 +57,13 @@ public function toMail($notifiable) public function toArray($notifiable) { return [ - 'title' => __('Your servers have been suspended!'), - 'content' => " -
". __('Your servers have been suspended!')."
-

". __("To automatically re-enable your server/s, you need to purchase more credits.")."

-

". __('If you have any questions please let us know.')."

-

". __('Regards').",
" . config('app.name', 'Laravel') . "

- ", + 'title' => __('Your servers have been suspended!'), + 'content' => ' +
'.__('Your servers have been suspended!').'
+

'.__('To automatically re-enable your server/s, you need to purchase more credits.').'

+

'.__('If you have any questions please let us know.').'

+

'.__('Regards').',
'.config('app.name', 'Laravel').'

+ ', ]; } } diff --git a/app/Notifications/Ticket/Admin/AdminCreateNotification.php b/app/Notifications/Ticket/Admin/AdminCreateNotification.php index eb832596a..0340dfaaf 100644 --- a/app/Notifications/Ticket/Admin/AdminCreateNotification.php +++ b/app/Notifications/Ticket/Admin/AdminCreateNotification.php @@ -11,12 +11,12 @@ class AdminCreateNotification extends Notification implements ShouldQueue { - //THIS IS BASICALLY NOT USED ANYMORE WITH INVOICENOTIFICATION IN PLACE use Queueable; private Ticket $ticket; + private User $user; /** @@ -27,7 +27,7 @@ class AdminCreateNotification extends Notification implements ShouldQueue public function __construct(Ticket $ticket, User $user) { $this->ticket = $ticket; - $this->user = $user; + $this->user = $user; } /** @@ -38,7 +38,8 @@ public function __construct(Ticket $ticket, User $user) */ public function via($notifiable) { - $via = ['mail','database']; + $via = ['mail', 'database']; + return $via; } @@ -51,20 +52,20 @@ public function via($notifiable) public function toMail($notifiable) { return (new MailMessage) - ->subject('[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title) - ->markdown('mail.ticket.admin.create' , ['ticket' => $this->ticket, 'user' => $this->user]); + ->subject('[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title) + ->markdown('mail.ticket.admin.create', ['ticket' => $this->ticket, 'user' => $this->user]); } /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ - 'title' => '[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title, + 'title' => '[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title, 'content' => "Ticket With ID : {$this->ticket->ticket_id} has been opened by {$this->user->name}", ]; } diff --git a/app/Notifications/Ticket/Admin/AdminReplyNotification.php b/app/Notifications/Ticket/Admin/AdminReplyNotification.php index 250d06d65..d49758b97 100644 --- a/app/Notifications/Ticket/Admin/AdminReplyNotification.php +++ b/app/Notifications/Ticket/Admin/AdminReplyNotification.php @@ -11,13 +11,14 @@ class AdminReplyNotification extends Notification implements ShouldQueue { - //THIS IS BASICALLY NOT USED ANYMORE WITH INVOICENOTIFICATION IN PLACE use Queueable; private Ticket $ticket; + private User $user; + private $newmessage; /** @@ -27,8 +28,8 @@ class AdminReplyNotification extends Notification implements ShouldQueue */ public function __construct(Ticket $ticket, User $user, $newmessage) { - $this->ticket = $ticket; - $this->user = $user; + $this->ticket = $ticket; + $this->user = $user; $this->newmessage = $newmessage; } @@ -40,7 +41,8 @@ public function __construct(Ticket $ticket, User $user, $newmessage) */ public function via($notifiable) { - $via = ['mail','database']; + $via = ['mail', 'database']; + return $via; } @@ -53,20 +55,20 @@ public function via($notifiable) public function toMail($notifiable) { return (new MailMessage) - ->subject('[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title) - ->markdown('mail.ticket.admin.reply' , ['ticket' => $this->ticket, 'user' => $this->user, 'newmessage' => $this->newmessage]); + ->subject('[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title) + ->markdown('mail.ticket.admin.reply', ['ticket' => $this->ticket, 'user' => $this->user, 'newmessage' => $this->newmessage]); } /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ - 'title' => '[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title, + 'title' => '[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title, 'content' => "

Ticket With ID : {$this->ticket->ticket_id} has had a new reply posted by {$this->user->name}


diff --git a/app/Notifications/Ticket/User/CreateNotification.php b/app/Notifications/Ticket/User/CreateNotification.php index 3d2580301..6cb488328 100644 --- a/app/Notifications/Ticket/User/CreateNotification.php +++ b/app/Notifications/Ticket/User/CreateNotification.php @@ -10,7 +10,6 @@ class CreateNotification extends Notification implements ShouldQueue { - //THIS IS BASICALLY NOT USED ANYMORE WITH INVOICENOTIFICATION IN PLACE use Queueable; @@ -35,7 +34,8 @@ public function __construct(Ticket $ticket) */ public function via($notifiable) { - $via = ['mail','database']; + $via = ['mail', 'database']; + return $via; } @@ -48,20 +48,20 @@ public function via($notifiable) public function toMail($notifiable) { return (new MailMessage) - ->subject('[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title) - ->markdown('mail.ticket.user.create' , ['ticket' => $this->ticket]); + ->subject('[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title) + ->markdown('mail.ticket.user.create', ['ticket' => $this->ticket]); } /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ - 'title' => '[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title, + 'title' => '[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title, 'content' => "Your Ticket has been Created With ID : {$this->ticket->ticket_id}", ]; } diff --git a/app/Notifications/Ticket/User/ReplyNotification.php b/app/Notifications/Ticket/User/ReplyNotification.php index 1d2b733a5..19b52514f 100644 --- a/app/Notifications/Ticket/User/ReplyNotification.php +++ b/app/Notifications/Ticket/User/ReplyNotification.php @@ -2,8 +2,8 @@ namespace App\Notifications\Ticket\User; -use App\Models\User; use App\Models\Ticket; +use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; @@ -11,13 +11,14 @@ class ReplyNotification extends Notification implements ShouldQueue { - //THIS IS BASICALLY NOT USED ANYMORE WITH INVOICENOTIFICATION IN PLACE use Queueable; private Ticket $ticket; + private User $user; + private $newmessage; /** @@ -27,8 +28,8 @@ class ReplyNotification extends Notification implements ShouldQueue */ public function __construct(Ticket $ticket, User $user, $newmessage) { - $this->ticket = $ticket; - $this->user = $user; + $this->ticket = $ticket; + $this->user = $user; $this->newmessage = $newmessage; } @@ -40,7 +41,8 @@ public function __construct(Ticket $ticket, User $user, $newmessage) */ public function via($notifiable) { - $via = ['mail','database']; + $via = ['mail', 'database']; + return $via; } @@ -53,20 +55,20 @@ public function via($notifiable) public function toMail($notifiable) { return (new MailMessage) - ->subject('[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title) - ->markdown('mail.ticket.user.reply' , ['ticket' => $this->ticket, 'user' => $this->user, 'newmessage' => $this->newmessage]); + ->subject('[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title) + ->markdown('mail.ticket.user.reply', ['ticket' => $this->ticket, 'user' => $this->user, 'newmessage' => $this->newmessage]); } /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { return [ - 'title' => '[Ticket ID: ' . $this->ticket->ticket_id . '] ' . $this->ticket->title, + 'title' => '[Ticket ID: '.$this->ticket->ticket_id.'] '.$this->ticket->title, 'content' => "

Ticket With ID : {$this->ticket->ticket_id} A response has been added to your ticket. Please see below for our response!


diff --git a/app/Notifications/WelcomeMessage.php b/app/Notifications/WelcomeMessage.php index 3841fc83f..d6aa073b6 100644 --- a/app/Notifications/WelcomeMessage.php +++ b/app/Notifications/WelcomeMessage.php @@ -2,7 +2,6 @@ namespace App\Notifications; -use App\Models\Settings; use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; @@ -20,7 +19,7 @@ class WelcomeMessage extends Notification implements ShouldQueue /** * Create a new notification instance. * - * @param User $user + * @param User $user */ public function __construct(User $user) { @@ -30,56 +29,56 @@ public function __construct(User $user) /** * Get the notification's delivery channels. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function via($notifiable) { return ['database']; } + public function AdditionalLines() { - - $AdditionalLine = ""; + $AdditionalLine = ''; if (config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL') != 0) { - $AdditionalLine .= __("Verifying your e-mail address will grant you ") . config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL'). " " . __("additional") . " " . config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME') . ".
"; + $AdditionalLine .= __('Verifying your e-mail address will grant you ').config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL').' '.__('additional').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').'.
'; } if (config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') != 0) { - $AdditionalLine .= __("Verifying your e-mail will also increase your Server Limit by ") . config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') . ".
"; + $AdditionalLine .= __('Verifying your e-mail will also increase your Server Limit by ').config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL').'.
'; } - $AdditionalLine .= "
"; + $AdditionalLine .= '
'; if (config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD') != 0) { - $AdditionalLine .= __("You can also verify your discord account to get another ") . config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD') . " " . config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME') . ".
"; + $AdditionalLine .= __('You can also verify your discord account to get another ').config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD').' '.config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME').'.
'; } if (config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') != 0) { - $AdditionalLine .= __("Verifying your Discord account will also increase your Server Limit by ") . config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD') . ".
"; + $AdditionalLine .= __('Verifying your Discord account will also increase your Server Limit by ').config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD').'.
'; } return $AdditionalLine; } + /** * Get the array representation of the notification. * - * @param mixed $notifiable + * @param mixed $notifiable * @return array */ public function toArray($notifiable) { - return [ - 'title' => __("Getting started!"), - 'content' => " -

".__("Hello")." {$this->user->name}, ".__("Welcome to our dashboard")."!

-
".__("Verification")."
-

".__("You can verify your e-mail address and link/verify your Discord account.")."

+ 'title' => __('Getting started!'), + 'content' => ' +

'.__('Hello')." {$this->user->name}, ".__('Welcome to our dashboard').'!

+
'.__('Verification').'
+

'.__('You can verify your e-mail address and link/verify your Discord account.').'

- " . $this->AdditionalLines() . " + '.$this->AdditionalLines().'

-
".__("Information")."
-

".__("This dashboard can be used to create and delete servers").".
".__("These servers can be used and managed on our pterodactyl panel").".
".__("If you have any questions, please join our Discord server and #create-a-ticket").".

-

".__("We hope you can enjoy this hosting experience and if you have any suggestions please let us know")."!

-

".__("Regards").",
" . config('app.name', 'Laravel') . "

- ", +
'.__('Information').'
+

'.__('This dashboard can be used to create and delete servers').'.
'.__('These servers can be used and managed on our pterodactyl panel').'.
'.__('If you have any questions, please join our Discord server and #create-a-ticket').'.

+

'.__('We hope you can enjoy this hosting experience and if you have any suggestions please let us know').'!

+

'.__('Regards').',
'.config('app.name', 'Laravel').'

+ ', ]; } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 4a193f987..e9390b6e4 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -3,13 +3,14 @@ namespace App\Providers; use App\Models\Settings; +use Exception; use Illuminate\Pagination\Paginator; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Validator; use Illuminate\Support\ServiceProvider; -use Exception; +use Qirolab\Theme\Theme; class AppServiceProvider extends ServiceProvider { @@ -44,9 +45,9 @@ public function boot() } //if none of result array is true. it sets ok to false - if (!in_array(true, $result)) { + if (! in_array(true, $result)) { $ok = false; - $validator->setCustomMessages(['multiple_date_format' => 'The format must be one of ' . join(",", $parameters)]); + $validator->setCustomMessages(['multiple_date_format' => 'The format must be one of '.implode(',', $parameters)]); } return $ok; @@ -60,6 +61,14 @@ public function boot() config([$setting->key => $setting->value]); } + if(!file_exists(base_path('themes')."/".config("SETTINGS::SYSTEM:THEME"))){ + config(['SETTINGS::SYSTEM:THEME' => "default"]); + } + + if(config('theme.active') == null){ + Theme::set(config("SETTINGS::SYSTEM:THEME","default"), "default"); + } + // Set Mail Config //only update config if mail settings have changed in DB if ( @@ -88,10 +97,9 @@ public function boot() Artisan::call('queue:restart'); } - // Set Recaptcha API Config // Load recaptcha package if recaptcha is enabled - if(config('SETTINGS::RECAPTCHA:ENABLED') == 'true') { + if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') { $this->app->register(\Biscolab\ReCaptcha\ReCaptchaServiceProvider::class); } @@ -107,29 +115,27 @@ public function boot() Artisan::call('cache:clear'); } - try { $stringfromfile = file(base_path().'/.git/HEAD'); $firstLine = $stringfromfile[0]; //get the string from the array - $explodedstring = explode("/", $firstLine, 3); //seperate out by the "/" in the string + $explodedstring = explode('/', $firstLine, 3); //seperate out by the "/" in the string $branchname = $explodedstring[2]; //get the one that is always the branch name } catch (Exception $e) { - $branchname = "unknown"; + $branchname = 'unknown'; Log::error($e); } config(['BRANCHNAME' => $branchname]); - // Set Discord-API Config config(['services.discord.client_id' => config('SETTINGS::DISCORD:CLIENT_ID')]); config(['services.discord.client_secret' => config('SETTINGS::DISCORD:CLIENT_SECRET')]); } catch (Exception $e) { - error_log("Settings Error: Could not load settings from database. The Installation probably is not done yet."); + error_log('Settings Error: Could not load settings from database. The Installation probably is not done yet.'); error_log($e); - Log::error("Settings Error: Could not load settings from database. The Installation probably is not done yet."); + Log::error('Settings Error: Could not load settings from database. The Installation probably is not done yet.'); Log::error($e); } } diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index ce7449164..d49c38697 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -3,7 +3,6 @@ namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Gate; class AuthServiceProvider extends ServiceProvider { diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index d42ccae5f..bdd71a3ae 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -2,13 +2,15 @@ namespace App\Providers; +use App\Events\PaymentEvent; use App\Events\UserUpdateCreditsEvent; +use App\Listeners\CreateInvoice; use App\Listeners\UnsuspendServers; +use App\Listeners\UserPayment; use App\Listeners\Verified; use Illuminate\Auth\Events\Registered; use Illuminate\Auth\Listeners\SendEmailVerificationNotification; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; -use Illuminate\Support\Facades\Event; use SocialiteProviders\Manager\SocialiteWasCalled; class EventServiceProvider extends ServiceProvider @@ -23,7 +25,11 @@ class EventServiceProvider extends ServiceProvider SendEmailVerificationNotification::class, ], UserUpdateCreditsEvent::class => [ - UnsuspendServers::class + UnsuspendServers::class, + ], + PaymentEvent::class => [ + CreateInvoice::class, + UserPayment::class, ], SocialiteWasCalled::class => [ // ... other providers @@ -43,4 +49,14 @@ public function boot() { // } + + /** + * Determine if events and listeners should be automatically discovered. + * + * @return bool + */ + public function shouldDiscoverEvents() + { + return false; + } } diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index eef3de133..09e6fa4e6 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -19,15 +19,6 @@ class RouteServiceProvider extends ServiceProvider */ public const HOME = '/home'; - /** - * The controller namespace for the application. - * - * When present, controller route declarations will automatically be prefixed with this namespace. - * - * @var string|null - */ - // protected $namespace = 'App\\Http\\Controllers'; - /** * Define your route model bindings, pattern filters, etc. * @@ -40,13 +31,10 @@ public function boot() $this->routes(function () { Route::prefix('api') ->middleware('api') - ->namespace($this->namespace) ->group(base_path('routes/api.php')); Route::middleware('web') - ->namespace($this->namespace) ->group(base_path('routes/web.php')); - }); } @@ -58,10 +46,10 @@ public function boot() protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { - return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); + return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); }); RateLimiter::for('web', function (Request $request) { - return Limit::perMinute(40)->by(optional($request->user())->id ?: $request->ip()); + return Limit::perMinute(40)->by($request->user()?->id ?: $request->ip()); }); } } diff --git a/app/Traits/Invoiceable.php b/app/Traits/Invoiceable.php new file mode 100644 index 000000000..932fa89de --- /dev/null +++ b/app/Traits/Invoiceable.php @@ -0,0 +1,90 @@ +user; + //create invoice + $lastInvoiceID = \App\Models\Invoice::where("invoice_name", "like", "%" . now()->format('mY') . "%")->count("id"); + $newInvoiceID = $lastInvoiceID + 1; + $logoPath = storage_path('app/public/logo.png'); + + $seller = new Party([ + 'name' => config("SETTINGS::INVOICE:COMPANY_NAME"), + 'phone' => config("SETTINGS::INVOICE:COMPANY_PHONE"), + 'address' => config("SETTINGS::INVOICE:COMPANY_ADDRESS"), + 'vat' => config("SETTINGS::INVOICE:COMPANY_VAT"), + 'custom_fields' => [ + 'E-Mail' => config("SETTINGS::INVOICE:COMPANY_MAIL"), + "Web" => config("SETTINGS::INVOICE:COMPANY_WEBSITE") + ], + ]); + + $customer = new Buyer([ + 'name' => $user->name, + 'custom_fields' => [ + 'E-Mail' => $user->email, + 'Client ID' => $user->id, + ], + ]); + $item = (new InvoiceItem()) + ->title($shopProduct->description) + ->pricePerUnit($shopProduct->price); + + $notes = [ + __("Payment method") . ": " . $payment->payment_method, + ]; + $notes = implode("
", $notes); + + + $invoice = Invoice::make() + ->template('controlpanel') + ->name(__("Invoice")) + ->buyer($customer) + ->seller($seller) + ->discountByPercent(PartnerDiscount::getDiscount()) + ->taxRate(floatval($shopProduct->getTaxPercent())) + ->shipping(0) + ->addItem($item) + ->status(__($payment->status)) + ->series(now()->format('mY')) + ->delimiter("-") + ->sequence($newInvoiceID) + ->serialNumberFormat(config("SETTINGS::INVOICE:PREFIX") . '{DELIMITER}{SERIES}{SEQUENCE}') + ->currencyCode(strtoupper($payment->currency_code)) + ->currencySymbol(Currencies::getSymbol(strtoupper($payment->currency_code))) + ->notes($notes); + + if (file_exists($logoPath)) { + $invoice->logo($logoPath); + } + + //Save the invoice in "storage\app\invoice\USER_ID\YEAR" + $invoice->filename = $invoice->getSerialNumber() . '.pdf'; + $invoice->render(); + Storage::disk("local")->put("invoice/" . $user->id . "/" . now()->format('Y') . "/" . $invoice->filename, $invoice->output); + + \App\Models\Invoice::create([ + 'invoice_user' => $user->id, + 'invoice_name' => $invoice->getSerialNumber(), + 'payment_id' => $payment->payment_id, + ]); + + //Send Invoice per Mail + $user->notify(new InvoiceNotification($invoice, $user, $payment)); + } +} diff --git a/composer.json b/composer.json index 37a657e20..6dfc73bbe 100644 --- a/composer.json +++ b/composer.json @@ -8,42 +8,47 @@ ], "license": "MIT", "require": { - "php": "^8.0|^7.4", + "php": "^8.1", "ext-intl": "*", "biscolab/laravel-recaptcha": "^5.4", "doctrine/dbal": "^3.1", - "fideloper/proxy": "^4.4", - "fruitcake/laravel-cors": "^2.0", - "guzzlehttp/guzzle": "^7.0.1", + "guzzlehttp/guzzle": "^7.2", "hidehalo/nanoid-php": "^1.1", - "kkomelin/laravel-translatable-string-exporter": "^1.14", - "laravel/framework": "^8.12", - "laravel/tinker": "^2.5", - "laravel/ui": "^3.2", - "laraveldaily/laravel-invoices": "^2.0", + "kkomelin/laravel-translatable-string-exporter": "^1.18", + "laravel/framework": "^9.46", + "laravel/tinker": "^2.7", + "laravel/ui": "^3.3", + "laraveldaily/laravel-invoices": "^3.0", + "league/flysystem-aws-s3-v3": "^3.0", "paypal/paypal-checkout-sdk": "^1.0", "paypal/rest-api-sdk-php": "^1.14", + "qirolab/laravel-themer": "^2.0", "socialiteproviders/discord": "^4.1", - "spatie/laravel-activitylog": "^3.16", - "spatie/laravel-query-builder": "^3.6", - "spatie/laravel-validation-rules": "^3.0", + "spatie/laravel-activitylog": "^4.4", + "spatie/laravel-query-builder": "^5.0", + "spatie/laravel-validation-rules": "^3.2", "stripe/stripe-php": "^7.107", - "symfony/intl": "^5.4", - "yajra/laravel-datatables-oracle": "~9.0" + "symfony/http-client": "^6.2", + "symfony/intl": "^6.0", + "symfony/mailgun-mailer": "^6.2", + "yajra/laravel-datatables-oracle": "^9.19" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.6", - "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", - "laravel/sail": "^1.0.1", - "mockery/mockery": "^1.4.2", - "nunomaduro/collision": "^5.0", - "phpunit/phpunit": "^9.3.3" + "laravel/sail": "^1.15", + "mockery/mockery": "^1.4.4", + "nunomaduro/collision": "^6.3", + "phpunit/phpunit": "^9.5.10", + "spatie/laravel-ignition": "^1.4" }, "config": { "optimize-autoloader": true, "preferred-install": "dist", - "sort-packages": true + "sort-packages": true, + "platform": { + "php": "8.1" + } }, "extra": { "laravel": { @@ -76,6 +81,9 @@ ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" + ], + "post-update-cmd": [ + "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ] } } diff --git a/composer.lock b/composer.lock index 05fc48256..22199e07c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,94 +4,189 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "275c5d5f239c60f912cf741392f4f063", + "content-hash": "be76c9bab8622d363a4eb843794e9e3e", "packages": [ { - "name": "asm89/stack-cors", - "version": "v2.1.1", + "name": "aws/aws-crt-php", + "version": "v1.0.2", "source": { "type": "git", - "url": "https://github.com/asm89/stack-cors.git", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a" + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "3942776a8c99209908ee0b287746263725685732" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/asm89/stack-cors/zipball/73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", - "reference": "73e5b88775c64ccc0b84fb60836b30dc9d92ac4a", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/3942776a8c99209908ee0b287746263725685732", + "reference": "3942776a8c99209908ee0b287746263725685732", "shasum": "" }, "require": { - "php": "^7.2|^8.0", - "symfony/http-foundation": "^4|^5|^6", - "symfony/http-kernel": "^4|^5|^6" + "php": ">=5.5" }, "require-dev": { - "phpunit/phpunit": "^7|^9", - "squizlabs/php_codesniffer": "^3.5" + "phpunit/phpunit": "^4.8.35|^5.4.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.0.2" + }, + "time": "2021-09-03T22:57:30+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.255.9", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "a001ab98b9e76a6f5cae327b3316b08fab37a296" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/a001ab98b9e76a6f5cae327b3316b08fab37a296", + "reference": "a001ab98b9e76a6f5cae327b3316b08fab37a296", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.0.2", + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", + "guzzlehttp/promises": "^1.4.0", + "guzzlehttp/psr7": "^1.8.5 || ^2.3", + "mtdowling/jmespath.php": "^2.6", + "php": ">=5.5" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "composer/composer": "^1.10.22", + "dms/phpunit-arraysubset-asserts": "^0.4.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "nette/neon": "^2.3", + "paragonie/random_compat": ">= 2", + "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "3.0-dev" } }, "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { - "Asm89\\Stack\\": "src/" + "Aws\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "Apache-2.0" ], "authors": [ { - "name": "Alexander", - "email": "iam.asm89@gmail.com" + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" } ], - "description": "Cross-origin resource sharing library and stack middleware", - "homepage": "https://github.com/asm89/stack-cors", + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", "keywords": [ - "cors", - "stack" + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" ], "support": { - "issues": "https://github.com/asm89/stack-cors/issues", - "source": "https://github.com/asm89/stack-cors/tree/v2.1.1" + "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", + "issues": "https://github.com/aws/aws-sdk-php/issues", + "source": "https://github.com/aws/aws-sdk-php/tree/3.255.9" }, - "time": "2022-01-18T09:12:03+00:00" + "time": "2023-01-04T19:24:09+00:00" }, { "name": "barryvdh/laravel-dompdf", - "version": "v0.9.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-dompdf.git", - "reference": "5b99e1f94157d74e450f4c97e8444fcaffa2144b" + "reference": "1d47648c6cef37f715ecb8bcc5f5a656ad372e27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/5b99e1f94157d74e450f4c97e8444fcaffa2144b", - "reference": "5b99e1f94157d74e450f4c97e8444fcaffa2144b", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/1d47648c6cef37f715ecb8bcc5f5a656ad372e27", + "reference": "1d47648c6cef37f715ecb8bcc5f5a656ad372e27", "shasum": "" }, "require": { - "dompdf/dompdf": "^1", - "illuminate/support": "^5.5|^6|^7|^8", - "php": "^7.1 || ^8.0" + "dompdf/dompdf": "^2", + "illuminate/support": "^6|^7|^8|^9", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "nunomaduro/larastan": "^1|^2", + "orchestra/testbench": "^4|^5|^6|^7", + "phpro/grumphp": "^1", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9-dev" + "dev-master": "2.0-dev" }, "laravel": { "providers": [ "Barryvdh\\DomPDF\\ServiceProvider" ], "aliases": { - "PDF": "Barryvdh\\DomPDF\\Facade" + "Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf", + "PDF": "Barryvdh\\DomPDF\\Facade\\Pdf" } } }, @@ -118,15 +213,19 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-dompdf/issues", - "source": "https://github.com/barryvdh/laravel-dompdf/tree/v0.9.0" + "source": "https://github.com/barryvdh/laravel-dompdf/tree/v2.0.0" }, "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, { "url": "https://github.com/barryvdh", "type": "github" } ], - "time": "2020-12-27T12:05:53+00:00" + "time": "2022-07-06T11:12:10+00:00" }, { "name": "biscolab/laravel-recaptcha", @@ -201,16 +300,16 @@ }, { "name": "brick/math", - "version": "0.10.1", + "version": "0.10.2", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "de846578401f4e58f911b3afeb62ced56365ed87" + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/de846578401f4e58f911b3afeb62ced56365ed87", - "reference": "de846578401f4e58f911b3afeb62ced56365ed87", + "url": "https://api.github.com/repos/brick/math/zipball/459f2781e1a08d52ee56b0b1444086e038561e3f", + "reference": "459f2781e1a08d52ee56b0b1444086e038561e3f", "shasum": "" }, "require": { @@ -245,7 +344,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.10.1" + "source": "https://github.com/brick/math/tree/0.10.2" }, "funding": [ { @@ -253,20 +352,20 @@ "type": "github" } ], - "time": "2022-08-01T22:54:31+00:00" + "time": "2022-08-10T22:54:19+00:00" }, { "name": "dflydev/dot-access-data", - "version": "v3.0.1", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/dflydev/dflydev-dot-access-data.git", - "reference": "0992cc19268b259a39e86f296da5f0677841f42c" + "reference": "f41715465d65213d644d3141a6a93081be5d3549" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/0992cc19268b259a39e86f296da5f0677841f42c", - "reference": "0992cc19268b259a39e86f296da5f0677841f42c", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/f41715465d65213d644d3141a6a93081be5d3549", + "reference": "f41715465d65213d644d3141a6a93081be5d3549", "shasum": "" }, "require": { @@ -277,7 +376,7 @@ "phpunit/phpunit": "^7.5 || ^8.5 || ^9.3", "scrutinizer/ocular": "1.6.0", "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^3.14" + "vimeo/psalm": "^4.0.0" }, "type": "library", "extra": { @@ -326,9 +425,9 @@ ], "support": { "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", - "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.1" + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.2" }, - "time": "2021-08-13T13:06:58+00:00" + "time": "2022-10-27T11:44:00+00:00" }, { "name": "doctrine/cache", @@ -425,38 +524,38 @@ }, { "name": "doctrine/dbal", - "version": "3.3.7", + "version": "3.5.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a" + "reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/9f79d4650430b582f4598fe0954ef4d52fbc0a8a", - "reference": "9f79d4650430b582f4598fe0954ef4d52fbc0a8a", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/63e513cebbbaf96a6795e5c5ee34d205831bfc85", + "reference": "63e513cebbbaf96a6795e5c5ee34d205831bfc85", "shasum": "" }, "require": { "composer-runtime-api": "^2", "doctrine/cache": "^1.11|^2.0", "doctrine/deprecations": "^0.5.3|^1", - "doctrine/event-manager": "^1.0", - "php": "^7.3 || ^8.0", + "doctrine/event-manager": "^1|^2", + "php": "^7.4 || ^8.0", "psr/cache": "^1|^2|^3", "psr/log": "^1|^2|^3" }, "require-dev": { - "doctrine/coding-standard": "9.0.0", - "jetbrains/phpstorm-stubs": "2022.1", - "phpstan/phpstan": "1.7.13", - "phpstan/phpstan-strict-rules": "^1.2", - "phpunit/phpunit": "9.5.20", - "psalm/plugin-phpunit": "0.16.1", - "squizlabs/php_codesniffer": "3.7.0", - "symfony/cache": "^5.2|^6.0", - "symfony/console": "^2.7|^3.0|^4.0|^5.0|^6.0", - "vimeo/psalm": "4.23.0" + "doctrine/coding-standard": "11.0.0", + "jetbrains/phpstorm-stubs": "2022.3", + "phpstan/phpstan": "1.9.2", + "phpstan/phpstan-strict-rules": "^1.4", + "phpunit/phpunit": "9.5.27", + "psalm/plugin-phpunit": "0.18.4", + "squizlabs/php_codesniffer": "3.7.1", + "symfony/cache": "^5.4|^6.0", + "symfony/console": "^4.4|^5.4|^6.0", + "vimeo/psalm": "4.30.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -516,7 +615,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.3.7" + "source": "https://github.com/doctrine/dbal/tree/3.5.2" }, "funding": [ { @@ -532,7 +631,7 @@ "type": "tidelift" } ], - "time": "2022-06-13T21:43:03+00:00" + "time": "2022-12-19T08:17:34+00:00" }, { "name": "doctrine/deprecations", @@ -579,34 +678,34 @@ }, { "name": "doctrine/event-manager", - "version": "1.1.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/event-manager.git", - "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683" + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", - "reference": "eb2ecf80e3093e8f3c2769ac838e27d8ede8e683", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32", + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "conflict": { "doctrine/common": "<2.9" }, "require-dev": { - "doctrine/coding-standard": "^9", - "phpstan/phpstan": "~1.4.10 || ^1.5.4", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.28" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" + "Doctrine\\Common\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -650,7 +749,7 @@ ], "support": { "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.1.2" + "source": "https://github.com/doctrine/event-manager/tree/2.0.0" }, "funding": [ { @@ -666,32 +765,32 @@ "type": "tidelift" } ], - "time": "2022-07-27T22:18:11+00:00" + "time": "2022-10-12T20:59:15+00:00" }, { "name": "doctrine/inflector", - "version": "2.0.4", + "version": "2.0.6", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", + "reference": "d9d313a36c872fd6ee06d9a6cbcf713eaa40f024", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^4.10" + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25" }, "type": "library", "autoload": { @@ -741,7 +840,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.4" + "source": "https://github.com/doctrine/inflector/tree/2.0.6" }, "funding": [ { @@ -757,35 +856,37 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:16:43+00:00" + "time": "2022-10-20T09:10:12+00:00" }, { "name": "doctrine/lexer", - "version": "1.2.3", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.1 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0", + "doctrine/coding-standard": "^9 || ^10", "phpstan/phpstan": "^1.3", "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" }, "type": "library", "autoload": { "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + "Doctrine\\Common\\Lexer\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -817,7 +918,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.3" + "source": "https://github.com/doctrine/lexer/tree/2.1.0" }, "funding": [ { @@ -833,27 +934,28 @@ "type": "tidelift" } ], - "time": "2022-02-28T11:07:21+00:00" + "time": "2022-12-14T08:49:07+00:00" }, { "name": "dompdf/dompdf", - "version": "v1.2.2", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "5031045d9640b38cfc14aac9667470df09c9e090" + "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/5031045d9640b38cfc14aac9667470df09c9e090", - "reference": "5031045d9640b38cfc14aac9667470df09c9e090", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c5310df0e22c758c85ea5288175fc6cd777bc085", + "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", - "phenx/php-font-lib": "^0.5.4", - "phenx/php-svg-lib": "^0.3.3 || ^0.4.0", + "masterminds/html5": "^2.0", + "phenx/php-font-lib": ">=0.5.4 <1.0.0", + "phenx/php-svg-lib": ">=0.3.3 <1.0.0", "php": "^7.1 || ^8.0" }, "require-dev": { @@ -884,38 +986,30 @@ ], "authors": [ { - "name": "Fabien MĆ©nager", - "email": "fabien.menager@gmail.com" - }, - { - "name": "Brian Sweeney", - "email": "eclecticgeek@gmail.com" - }, - { - "name": "Gabriel Bull", - "email": "me@gabrielbull.com" + "name": "The Dompdf Community", + "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md" } ], "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", "homepage": "https://github.com/dompdf/dompdf", "support": { "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/v1.2.2" + "source": "https://github.com/dompdf/dompdf/tree/v2.0.1" }, - "time": "2022-04-27T13:50:54+00:00" + "time": "2022-09-22T13:43:41+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.1", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", "shasum": "" }, "require": { @@ -955,7 +1049,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" }, "funding": [ { @@ -963,31 +1057,30 @@ "type": "github" } ], - "time": "2022-01-18T15:43:28+00:00" + "time": "2022-09-10T18:51:20+00:00" }, { "name": "egulias/email-validator", - "version": "2.1.25", + "version": "3.2.5", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4" + "reference": "b531a2311709443320c786feb4519cfaf94af796" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/0dbf5d78455d4d6a41d186da50adc1122ec066f4", - "reference": "0dbf5d78455d4d6a41d186da50adc1122ec066f4", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/b531a2311709443320c786feb4519cfaf94af796", + "reference": "b531a2311709443320c786feb4519cfaf94af796", "shasum": "" }, "require": { - "doctrine/lexer": "^1.0.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.10" + "doctrine/lexer": "^1.2|^2", + "php": ">=7.2", + "symfony/polyfill-intl-idn": "^1.15" }, "require-dev": { - "dominicsayers/isemail": "^3.0.7", - "phpunit/phpunit": "^4.8.36|^7.5.15", - "satooshi/php-coveralls": "^1.0.1" + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" @@ -995,7 +1088,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1023,7 +1116,7 @@ ], "support": { "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/2.1.25" + "source": "https://github.com/egulias/EmailValidator/tree/3.2.5" }, "funding": [ { @@ -1031,42 +1124,34 @@ "type": "github" } ], - "time": "2020-12-29T14:50:06+00:00" + "time": "2023-01-02T17:26:14+00:00" }, { - "name": "fideloper/proxy", - "version": "4.4.2", + "name": "facade/ignition-contracts", + "version": "1.0.2", "source": { "type": "git", - "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750" + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", - "reference": "a751f2bc86dd8e6cfef12dc0cbdada82f5a18750", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", "shasum": "" }, "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0|^9.0", - "php": ">=5.4.0" + "php": "^7.3|^8.0" }, "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0|^8.0|^9.0", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^8.5.8|^9.3.3" + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" }, "type": "library", - "extra": { - "laravel": { - "providers": [ - "Fideloper\\Proxy\\TrustedProxyServiceProvider" - ] - } - }, "autoload": { "psr-4": { - "Fideloper\\Proxy\\": "src/" + "Facade\\IgnitionContracts\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -1075,57 +1160,52 @@ ], "authors": [ { - "name": "Chris Fidao", - "email": "fideloper@gmail.com" + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://flareapp.io", + "role": "Developer" } ], - "description": "Set trusted proxies for Laravel", + "description": "Solution contracts for Ignition", + "homepage": "https://github.com/facade/ignition-contracts", "keywords": [ - "load balancing", - "proxy", - "trusted proxy" + "contracts", + "flare", + "ignition" ], "support": { - "issues": "https://github.com/fideloper/TrustedProxy/issues", - "source": "https://github.com/fideloper/TrustedProxy/tree/4.4.2" + "issues": "https://github.com/facade/ignition-contracts/issues", + "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" }, - "time": "2022-02-09T13:33:34+00:00" + "time": "2020-10-16T08:27:54+00:00" }, { - "name": "fruitcake/laravel-cors", - "version": "v2.2.0", + "name": "fruitcake/php-cors", + "version": "v1.2.0", "source": { "type": "git", - "url": "https://github.com/fruitcake/laravel-cors.git", - "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534" + "url": "https://github.com/fruitcake/php-cors.git", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fruitcake/laravel-cors/zipball/783a74f5e3431d7b9805be8afb60fd0a8f743534", - "reference": "783a74f5e3431d7b9805be8afb60fd0a8f743534", + "url": "https://api.github.com/repos/fruitcake/php-cors/zipball/58571acbaa5f9f462c9c77e911700ac66f446d4e", + "reference": "58571acbaa5f9f462c9c77e911700ac66f446d4e", "shasum": "" }, "require": { - "asm89/stack-cors": "^2.0.1", - "illuminate/contracts": "^6|^7|^8|^9", - "illuminate/support": "^6|^7|^8|^9", - "php": ">=7.2" + "php": "^7.4|^8.0", + "symfony/http-foundation": "^4.4|^5.4|^6" }, "require-dev": { - "laravel/framework": "^6|^7.24|^8", - "orchestra/testbench-dusk": "^4|^5|^6|^7", - "phpunit/phpunit": "^6|^7|^8|^9", + "phpstan/phpstan": "^1.4", + "phpunit/phpunit": "^9", "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" - }, - "laravel": { - "providers": [ - "Fruitcake\\Cors\\CorsServiceProvider" - ] + "dev-main": "1.1-dev" } }, "autoload": { @@ -1143,20 +1223,20 @@ "homepage": "https://fruitcake.nl" }, { - "name": "Barry vd. Heuvel", + "name": "Barryvdh", "email": "barryvdh@gmail.com" } ], - "description": "Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application", + "description": "Cross-origin resource sharing library for the Symfony HttpFoundation", + "homepage": "https://github.com/fruitcake/php-cors", "keywords": [ - "api", "cors", - "crossdomain", - "laravel" + "laravel", + "symfony" ], "support": { - "issues": "https://github.com/fruitcake/laravel-cors/issues", - "source": "https://github.com/fruitcake/laravel-cors/tree/v2.2.0" + "issues": "https://github.com/fruitcake/php-cors/issues", + "source": "https://github.com/fruitcake/php-cors/tree/v1.2.0" }, "funding": [ { @@ -1168,7 +1248,7 @@ "type": "github" } ], - "time": "2022-02-23T14:25:13+00:00" + "time": "2022-02-20T15:07:15+00:00" }, { "name": "graham-campbell/result-type", @@ -1234,16 +1314,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.4.5", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82" + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", - "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba", + "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba", "shasum": "" }, "require": { @@ -1258,10 +1338,10 @@ "psr/http-client-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -1271,8 +1351,12 @@ }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { - "dev-master": "7.4-dev" + "dev-master": "7.5-dev" } }, "autoload": { @@ -1338,7 +1422,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.4.5" + "source": "https://github.com/guzzle/guzzle/tree/7.5.0" }, "funding": [ { @@ -1354,20 +1438,20 @@ "type": "tidelift" } ], - "time": "2022-06-20T22:16:13+00:00" + "time": "2022-08-28T15:39:27+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.5.1", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" + "reference": "b94b2807d85443f9719887892882d0329d1e2598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", - "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598", + "reference": "b94b2807d85443f9719887892882d0329d1e2598", "shasum": "" }, "require": { @@ -1422,7 +1506,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.5.1" + "source": "https://github.com/guzzle/promises/tree/1.5.2" }, "funding": [ { @@ -1438,20 +1522,20 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:56:57+00:00" + "time": "2022-08-28T14:55:35+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.4.0", + "version": "2.4.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "13388f00956b1503577598873fffb5ae994b5737" + "reference": "67c26b443f348a51926030c83481b85718457d3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/13388f00956b1503577598873fffb5ae994b5737", - "reference": "13388f00956b1503577598873fffb5ae994b5737", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/67c26b443f348a51926030c83481b85718457d3d", + "reference": "67c26b443f348a51926030c83481b85718457d3d", "shasum": "" }, "require": { @@ -1465,15 +1549,19 @@ "psr/http-message-implementation": "1.0" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", + "bamarni/composer-bin-plugin": "^1.8.1", "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, "branch-alias": { "dev-master": "2.4-dev" } @@ -1537,7 +1625,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.4.0" + "source": "https://github.com/guzzle/psr7/tree/2.4.3" }, "funding": [ { @@ -1553,7 +1641,7 @@ "type": "tidelift" } ], - "time": "2022-06-20T21:43:11+00:00" + "time": "2022-10-26T14:07:24+00:00" }, { "name": "hidehalo/nanoid-php", @@ -1679,56 +1767,57 @@ }, { "name": "laravel/framework", - "version": "v8.83.23", + "version": "v9.46.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491" + "reference": "62b05b6de5733d89378a279e40230a71e5ab5d92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/bdc707f8b9bcad289b24cd182d98ec7480ac4491", - "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491", + "url": "https://api.github.com/repos/laravel/framework/zipball/62b05b6de5733d89378a279e40230a71e5ab5d92", + "reference": "62b05b6de5733d89378a279e40230a71e5ab5d92", "shasum": "" }, "require": { - "doctrine/inflector": "^1.4|^2.0", - "dragonmantank/cron-expression": "^3.0.2", - "egulias/email-validator": "^2.1.10", - "ext-json": "*", + "doctrine/inflector": "^2.0", + "dragonmantank/cron-expression": "^3.3.2", + "egulias/email-validator": "^3.2.1", "ext-mbstring": "*", "ext-openssl": "*", - "laravel/serializable-closure": "^1.0", - "league/commonmark": "^1.3|^2.0.2", - "league/flysystem": "^1.1", + "fruitcake/php-cors": "^1.2", + "laravel/serializable-closure": "^1.2.2", + "league/commonmark": "^2.2.1", + "league/flysystem": "^3.8.0", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.53.1", - "opis/closure": "^3.6", - "php": "^7.3|^8.0", - "psr/container": "^1.0", - "psr/log": "^1.0|^2.0", - "psr/simple-cache": "^1.0", - "ramsey/uuid": "^4.2.2", - "swiftmailer/swiftmailer": "^6.3", - "symfony/console": "^5.4", - "symfony/error-handler": "^5.4", - "symfony/finder": "^5.4", - "symfony/http-foundation": "^5.4", - "symfony/http-kernel": "^5.4", - "symfony/mime": "^5.4", - "symfony/process": "^5.4", - "symfony/routing": "^5.4", - "symfony/var-dumper": "^5.4", - "tijsverkoyen/css-to-inline-styles": "^2.2.2", + "nesbot/carbon": "^2.62.1", + "nunomaduro/termwind": "^1.13", + "php": "^8.0.2", + "psr/container": "^1.1.1|^2.0.1", + "psr/log": "^1.0|^2.0|^3.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "ramsey/uuid": "^4.7", + "symfony/console": "^6.0.9", + "symfony/error-handler": "^6.0", + "symfony/finder": "^6.0", + "symfony/http-foundation": "^6.0", + "symfony/http-kernel": "^6.0", + "symfony/mailer": "^6.0", + "symfony/mime": "^6.0", + "symfony/process": "^6.0", + "symfony/routing": "^6.0", + "symfony/uid": "^6.0", + "symfony/var-dumper": "^6.0", + "tijsverkoyen/css-to-inline-styles": "^2.2.5", "vlucas/phpdotenv": "^5.4.1", - "voku/portable-ascii": "^1.6.1" + "voku/portable-ascii": "^2.0" }, "conflict": { "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0", - "psr/simple-cache-implementation": "1.0" + "psr/container-implementation": "1.1|2.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0" }, "replace": { "illuminate/auth": "self.version", @@ -1736,6 +1825,7 @@ "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/collections": "self.version", + "illuminate/conditionable": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", "illuminate/container": "self.version", @@ -1764,21 +1854,27 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.198.1", + "ably/ably-php": "^1.0", + "aws/aws-sdk-php": "^3.235.5", "doctrine/dbal": "^2.13.3|^3.1.4", - "filp/whoops": "^2.14.3", - "guzzlehttp/guzzle": "^6.5.5|^7.0.1", - "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.4.4", - "orchestra/testbench-core": "^6.27", + "fakerphp/faker": "^1.21", + "guzzlehttp/guzzle": "^7.5", + "league/flysystem-aws-s3-v3": "^3.0", + "league/flysystem-ftp": "^3.0", + "league/flysystem-path-prefixing": "^3.3", + "league/flysystem-read-only": "^3.3", + "league/flysystem-sftp-v3": "^3.0", + "mockery/mockery": "^1.5.1", + "orchestra/testbench-core": "^7.16", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.5.19|^9.5.8", - "predis/predis": "^1.1.9", - "symfony/cache": "^5.4" + "phpstan/phpstan": "^1.4.7", + "phpunit/phpunit": "^9.5.8", + "predis/predis": "^1.1.9|^2.0.2", + "symfony/cache": "^6.0" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.235.5).", "brianium/paratest": "Required to run tests in parallel (^6.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.4).", "ext-bcmath": "Required to use the multiple_of validation rule.", @@ -1790,27 +1886,31 @@ "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", + "guzzlehttp/guzzle": "Required to use the HTTP Client and the ping methods on schedules (^7.5).", "laravel/tinker": "Required to use the tinker console command (^2.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", - "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", - "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "mockery/mockery": "Required to use mocking (^1.4.4).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", + "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", + "league/flysystem-path-prefixing": "Required to use the scoped driver (^3.3).", + "league/flysystem-read-only": "Required to use read-only disks (^3.3)", + "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", + "mockery/mockery": "Required to use mocking (^1.5.1).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", - "predis/predis": "Required to use the predis connector (^1.1.9).", + "phpunit/phpunit": "Required to use assertions and run tests (^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9|^2.0.2).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0|^7.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^5.4).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^5.4).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0).", - "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^6.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^6.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^6.0).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^6.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^2.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" } }, "autoload": { @@ -1824,7 +1924,8 @@ "Illuminate\\": "src/Illuminate/", "Illuminate\\Support\\": [ "src/Illuminate/Macroable/", - "src/Illuminate/Collections/" + "src/Illuminate/Collections/", + "src/Illuminate/Conditionable/" ] } }, @@ -1848,29 +1949,30 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-07-26T13:30:00+00:00" + "time": "2023-01-03T15:12:31+00:00" }, { "name": "laravel/serializable-closure", - "version": "v1.2.0", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "09f0e9fb61829f628205b7c94906c28740ff9540" + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540", - "reference": "09f0e9fb61829f628205b7c94906c28740ff9540", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", "shasum": "" }, "require": { "php": "^7.3|^8.0" }, "require-dev": { - "pestphp/pest": "^1.18", - "phpstan/phpstan": "^0.12.98", - "symfony/var-dumper": "^5.3" + "nesbot/carbon": "^2.61", + "pestphp/pest": "^1.21.3", + "phpstan/phpstan": "^1.8.2", + "symfony/var-dumper": "^5.4.11" }, "type": "library", "extra": { @@ -1907,20 +2009,20 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-05-16T17:09:47+00:00" + "time": "2022-09-08T13:45:54+00:00" }, { "name": "laravel/socialite", - "version": "v5.5.3", + "version": "v5.5.7", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "9dfc76b31ee041c45a7cae86f23339784abde46d" + "reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/9dfc76b31ee041c45a7cae86f23339784abde46d", - "reference": "9dfc76b31ee041c45a7cae86f23339784abde46d", + "url": "https://api.github.com/repos/laravel/socialite/zipball/ee6201f539ac47c3a55132449f9d20ee928f0ee2", + "reference": "ee6201f539ac47c3a55132449f9d20ee928f0ee2", "shasum": "" }, "require": { @@ -1976,20 +2078,20 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2022-07-18T13:51:19+00:00" + "time": "2022-12-28T12:35:23+00:00" }, { "name": "laravel/tinker", - "version": "v2.7.2", + "version": "v2.7.3", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "dff39b661e827dae6e092412f976658df82dbac5" + "reference": "5062061b4924af3392225dd482ca7b4d85d8b8ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/dff39b661e827dae6e092412f976658df82dbac5", - "reference": "dff39b661e827dae6e092412f976658df82dbac5", + "url": "https://api.github.com/repos/laravel/tinker/zipball/5062061b4924af3392225dd482ca7b4d85d8b8ef", + "reference": "5062061b4924af3392225dd482ca7b4d85d8b8ef", "shasum": "" }, "require": { @@ -2042,9 +2144,9 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.7.2" + "source": "https://github.com/laravel/tinker/tree/v2.7.3" }, - "time": "2022-03-23T12:38:24+00:00" + "time": "2022-11-09T15:11:38+00:00" }, { "name": "laravel/ui", @@ -2109,22 +2211,22 @@ }, { "name": "laraveldaily/laravel-invoices", - "version": "2.2.2", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/LaravelDaily/laravel-invoices.git", - "reference": "7e972624193e6a03c3e7d8cdbd9c053e82f487ca" + "reference": "6dabfd95ef9819b80182ebea8267b64f77c89326" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelDaily/laravel-invoices/zipball/7e972624193e6a03c3e7d8cdbd9c053e82f487ca", - "reference": "7e972624193e6a03c3e7d8cdbd9c053e82f487ca", + "url": "https://api.github.com/repos/LaravelDaily/laravel-invoices/zipball/6dabfd95ef9819b80182ebea8267b64f77c89326", + "reference": "6dabfd95ef9819b80182ebea8267b64f77c89326", "shasum": "" }, "require": { - "barryvdh/laravel-dompdf": "^0.9.0", - "illuminate/http": "^5.5|^6|^7|^8", - "illuminate/support": "^5.5|^6|^7|^8", + "barryvdh/laravel-dompdf": "^v2.0", + "illuminate/http": "^5.5|^6|^7|^8|^9", + "illuminate/support": "^5.5|^6|^7|^8|^9", "php": "^7.3|^8.0" }, "require-dev": { @@ -2164,26 +2266,27 @@ "keywords": [ "invoice", "invoices", - "laravel" + "laravel", + "pdf" ], "support": { "issues": "https://github.com/LaravelDaily/laravel-invoices/issues", - "source": "https://github.com/LaravelDaily/laravel-invoices/tree/2.2.2" + "source": "https://github.com/LaravelDaily/laravel-invoices/tree/3.0.2" }, - "time": "2022-01-17T07:31:43+00:00" + "time": "2022-08-05T06:57:45+00:00" }, { "name": "league/commonmark", - "version": "2.3.5", + "version": "2.3.8", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257" + "reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/84d74485fdb7074f4f9dd6f02ab957b1de513257", - "reference": "84d74485fdb7074f4f9dd6f02ab957b1de513257", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c493585c130544c4e91d2e0e131e6d35cb0cbc47", + "reference": "c493585c130544c4e91d2e0e131e6d35cb0cbc47", "shasum": "" }, "require": { @@ -2203,7 +2306,7 @@ "erusev/parsedown": "^1.0", "ext-json": "*", "github/gfm": "0.29.0", - "michelf/php-markdown": "^1.4", + "michelf/php-markdown": "^1.4 || ^2.0", "nyholm/psr7": "^1.5", "phpstan/phpstan": "^1.8.2", "phpunit/phpunit": "^9.5.21", @@ -2211,7 +2314,7 @@ "symfony/finder": "^5.3 | ^6.0", "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0", "unleashedtech/php-coding-standard": "^3.1.1", - "vimeo/psalm": "^4.24.0" + "vimeo/psalm": "^4.24.0 || ^5.0.0" }, "suggest": { "symfony/yaml": "v2.3+ required if using the Front Matter extension" @@ -2276,20 +2379,20 @@ "type": "tidelift" } ], - "time": "2022-07-29T10:59:45+00:00" + "time": "2022-12-10T16:02:17+00:00" }, { "name": "league/config", - "version": "v1.1.1", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/thephpleague/config.git", - "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e" + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/config/zipball/a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", - "reference": "a9d39eeeb6cc49d10a6e6c36f22c4c1f4a767f3e", + "url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", + "reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3", "shasum": "" }, "require": { @@ -2298,7 +2401,7 @@ "php": "^7.4 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan": "^1.8.2", "phpunit/phpunit": "^9.5.5", "scrutinizer/ocular": "^1.8.1", "unleashedtech/php-coding-standard": "^3.1", @@ -2358,58 +2461,53 @@ "type": "github" } ], - "time": "2021-08-14T12:15:32+00:00" + "time": "2022-12-11T20:36:23+00:00" }, { "name": "league/flysystem", - "version": "1.1.9", + "version": "3.12.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99" + "reference": "2aef65a47e44f2d6f9938f720f6dd697e7ba7b76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/094defdb4a7001845300334e7c1ee2335925ef99", - "reference": "094defdb4a7001845300334e7c1ee2335925ef99", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/2aef65a47e44f2d6f9938f720f6dd697e7ba7b76", + "reference": "2aef65a47e44f2d6f9938f720f6dd697e7ba7b76", "shasum": "" }, "require": { - "ext-fileinfo": "*", - "league/mime-type-detection": "^1.3", - "php": "^7.2.5 || ^8.0" + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" }, "conflict": { - "league/flysystem-sftp": "<1.0.6" + "aws/aws-sdk-php": "3.209.31 || 3.210.0", + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1", + "phpseclib/phpseclib": "3.0.15", + "symfony/http-client": "<5.2" }, "require-dev": { - "phpspec/prophecy": "^1.11.1", - "phpunit/phpunit": "^8.5.8" - }, - "suggest": { - "ext-ftp": "Allows you to use FTP server storage", - "ext-openssl": "Allows you to use FTPS server storage", - "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", - "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", - "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", - "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", - "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", - "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", - "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", - "league/flysystem-webdav": "Allows you to use WebDAV storage", - "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter", - "spatie/flysystem-dropbox": "Allows you to use Dropbox storage", - "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications" + "async-aws/s3": "^1.5", + "async-aws/simple-s3": "^1.1", + "aws/aws-sdk-php": "^3.198.1", + "composer/semver": "^3.0", + "ext-fileinfo": "*", + "ext-ftp": "*", + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.5", + "google/cloud-storage": "^1.23", + "microsoft/azure-storage-blob": "^1.1", + "phpseclib/phpseclib": "^3.0.14", + "phpstan/phpstan": "^0.12.26", + "phpunit/phpunit": "^9.5.11", + "sabre/dav": "^4.3.1" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, "autoload": { "psr-4": { - "League\\Flysystem\\": "src/" + "League\\Flysystem\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2419,40 +2517,112 @@ "authors": [ { "name": "Frank de Jonge", - "email": "info@frenky.net" + "email": "info@frankdejonge.nl" } ], - "description": "Filesystem abstraction: Many filesystems, one API.", + "description": "File storage abstraction for PHP", "keywords": [ - "Cloud Files", "WebDAV", - "abstraction", "aws", "cloud", - "copy.com", - "dropbox", - "file systems", + "file", "files", "filesystem", "filesystems", "ftp", - "rackspace", - "remote", "s3", "sftp", "storage" ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/1.1.9" + "source": "https://github.com/thephpleague/flysystem/tree/3.12.0" }, "funding": [ { - "url": "https://offset.earth/frankdejonge", - "type": "other" + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" + } + ], + "time": "2022-12-20T20:21:10+00:00" + }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "3.10.3", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "f593bf91f94f2adf4f71513d29f1dfa693f2f640" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/f593bf91f94f2adf4f71513d29f1dfa693f2f640", + "reference": "f593bf91f94f2adf4f71513d29f1dfa693f2f640", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.132.4", + "league/flysystem": "^3.10.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3V3\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "AWS S3 filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "aws", + "file", + "files", + "filesystem", + "s3", + "storage" + ], + "support": { + "issues": "https://github.com/thephpleague/flysystem-aws-s3-v3/issues", + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.10.3" + }, + "funding": [ + { + "url": "https://ecologi.com/frankdejonge", + "type": "custom" + }, + { + "url": "https://github.com/frankdejonge", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/league/flysystem", + "type": "tidelift" } ], - "time": "2021-12-09T09:40:50+00:00" + "time": "2022-10-26T18:15:09+00:00" }, { "name": "league/mime-type-detection", @@ -2587,47 +2757,116 @@ "time": "2022-04-15T14:02:14+00:00" }, { - "name": "monolog/monolog", - "version": "2.8.0", + "name": "masterminds/html5", + "version": "2.7.6", "source": { "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "897eb517a343a2281f11bc5556d6548db7d93947" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", - "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", + "reference": "897eb517a343a2281f11bc5556d6548db7d93947", "shasum": "" }, "require": { - "php": ">=7.2", - "psr/log": "^1.0.1 || ^2.0 || ^3.0" - }, - "provide": { - "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" + "ext-ctype": "*", + "ext-dom": "*", + "ext-libxml": "*", + "php": ">=5.3.0" }, "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "elasticsearch/elasticsearch": "^7 || ^8", - "ext-json": "*", - "graylog2/gelf-php": "^1.4.2", - "guzzlehttp/guzzle": "^7.4", - "guzzlehttp/psr7": "^2.2", - "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4 || ^3", - "phpspec/prophecy": "^1.15", - "phpstan/phpstan": "^0.12.91", - "phpunit/phpunit": "^8.5.14", - "predis/predis": "^1.1 || ^2.0", - "rollbar/rollbar": "^1.3 || ^2 || ^3", - "ruflin/elastica": "^7", - "swiftmailer/swiftmailer": "^5.3|^6.0", - "symfony/mailer": "^5.4 || ^6", - "symfony/mime": "^5.4 || ^6" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7" }, - "suggest": { + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.7.6" + }, + "time": "2022-08-18T16:18:26+00:00" + }, + { + "name": "monolog/monolog", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50", + "reference": "720488632c590286b88b80e62aa3d3d551ad4a50", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "psr/log": "^1.0.1 || ^2.0 || ^3.0" + }, + "provide": { + "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "elasticsearch/elasticsearch": "^7 || ^8", + "ext-json": "*", + "graylog2/gelf-php": "^1.4.2", + "guzzlehttp/guzzle": "^7.4", + "guzzlehttp/psr7": "^2.2", + "mongodb/mongodb": "^1.8", + "php-amqplib/php-amqplib": "~2.4 || ^3", + "phpspec/prophecy": "^1.15", + "phpstan/phpstan": "^0.12.91", + "phpunit/phpunit": "^8.5.14", + "predis/predis": "^1.1 || ^2.0", + "rollbar/rollbar": "^1.3 || ^2 || ^3", + "ruflin/elastica": "^7", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "symfony/mailer": "^5.4 || ^6", + "symfony/mime": "^5.4 || ^6" + }, + "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", "doctrine/couchdb": "Allow sending log messages to a CouchDB server", "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", @@ -2688,18 +2927,79 @@ ], "time": "2022-07-24T11:55:47+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.6.1", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/9b87907a81b87bc76d19a7fb2d61e61486ee9edb", + "reference": "9b87907a81b87bc76d19a7fb2d61e61486ee9edb", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" + }, + "require-dev": { + "composer/xdebug-handler": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^7.5.15" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "files": [ + "src/JmesPath.php" + ], + "psr-4": { + "JmesPath\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.6.1" + }, + "time": "2021-06-14T00:11:39+00:00" + }, { "name": "nesbot/carbon", - "version": "2.61.0", + "version": "2.64.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "bdf4f4fe3a3eac4de84dbec0738082a862c68ba6" + "reference": "f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bdf4f4fe3a3eac4de84dbec0738082a862c68ba6", - "reference": "bdf4f4fe3a3eac4de84dbec0738082a862c68ba6", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c", + "reference": "f2e59963f4c4f4fdfb9fcfd752e8d2e2b79a4e2c", "shasum": "" }, "require": { @@ -2710,7 +3010,7 @@ "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" }, "require-dev": { - "doctrine/dbal": "^2.0 || ^3.0", + "doctrine/dbal": "^2.0 || ^3.1.4", "doctrine/orm": "^2.7", "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", @@ -2788,29 +3088,29 @@ "type": "tidelift" } ], - "time": "2022-08-06T12:41:24+00:00" + "time": "2023-01-01T23:17:36+00:00" }, { "name": "nette/schema", - "version": "v1.2.2", + "version": "v1.2.3", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df" + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/9a39cef03a5b34c7de64f551538cbba05c2be5df", - "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df", + "url": "https://api.github.com/repos/nette/schema/zipball/abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", + "reference": "abbdbb70e0245d5f3bf77874cea1dfb0c930d06f", "shasum": "" }, "require": { "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", - "php": ">=7.1 <8.2" + "php": ">=7.1 <8.3" }, "require-dev": { "nette/tester": "^2.3 || ^2.4", - "phpstan/phpstan-nette": "^0.12", + "phpstan/phpstan-nette": "^1.0", "tracy/tracy": "^2.7" }, "type": "library", @@ -2848,26 +3148,26 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.2" + "source": "https://github.com/nette/schema/tree/v1.2.3" }, - "time": "2021-10-15T11:40:02+00:00" + "time": "2022-10-13T01:24:26+00:00" }, { "name": "nette/utils", - "version": "v3.2.7", + "version": "v3.2.8", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99" + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/0af4e3de4df9f1543534beab255ccf459e7a2c99", - "reference": "0af4e3de4df9f1543534beab255ccf459e7a2c99", + "url": "https://api.github.com/repos/nette/utils/zipball/02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", + "reference": "02a54c4c872b99e4ec05c4aec54b5a06eb0f6368", "shasum": "" }, "require": { - "php": ">=7.2 <8.2" + "php": ">=7.2 <8.3" }, "conflict": { "nette/di": "<3.0.6" @@ -2933,22 +3233,22 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v3.2.7" + "source": "https://github.com/nette/utils/tree/v3.2.8" }, - "time": "2022-01-24T11:29:14+00:00" + "time": "2022-09-12T23:36:20+00:00" }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", "shasum": "" }, "require": { @@ -2989,43 +3289,55 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-11-12T15:38:23+00:00" }, { - "name": "opis/closure", - "version": "3.6.3", + "name": "nunomaduro/termwind", + "version": "v1.15.0", "source": { "type": "git", - "url": "https://github.com/opis/closure.git", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad" + "url": "https://github.com/nunomaduro/termwind.git", + "reference": "594ab862396c16ead000de0c3c38f4a5cbe1938d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad", - "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/594ab862396c16ead000de0c3c38f4a5cbe1938d", + "reference": "594ab862396c16ead000de0c3c38f4a5cbe1938d", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0 || ^8.0" + "ext-mbstring": "*", + "php": "^8.0", + "symfony/console": "^5.3.0|^6.0.0" }, "require-dev": { - "jeremeamia/superclosure": "^2.0", - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0" + "ergebnis/phpstan-rules": "^1.0.", + "illuminate/console": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "laravel/pint": "^1.0.0", + "pestphp/pest": "^1.21.0", + "pestphp/pest-plugin-mock": "^1.0", + "phpstan/phpstan": "^1.4.6", + "phpstan/phpstan-strict-rules": "^1.1.0", + "symfony/var-dumper": "^5.2.7|^6.0.0", + "thecodingmachine/phpstan-strict-rules": "^1.0.0" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "3.6.x-dev" + "laravel": { + "providers": [ + "Termwind\\Laravel\\TermwindServiceProvider" + ] } }, "autoload": { "files": [ - "functions.php" + "src/Functions.php" ], "psr-4": { - "Opis\\Closure\\": "src/" + "Termwind\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3034,29 +3346,38 @@ ], "authors": [ { - "name": "Marius Sarca", - "email": "marius.sarca@gmail.com" - }, - { - "name": "Sorin Sarca", - "email": "sarca_sorin@hotmail.com" + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" } ], - "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.", - "homepage": "https://opis.io/closure", + "description": "Its like Tailwind CSS, but for the console.", "keywords": [ - "anonymous functions", - "closure", - "function", - "serializable", - "serialization", - "serialize" + "cli", + "console", + "css", + "package", + "php", + "style" ], "support": { - "issues": "https://github.com/opis/closure/issues", - "source": "https://github.com/opis/closure/tree/3.6.3" + "issues": "https://github.com/nunomaduro/termwind/issues", + "source": "https://github.com/nunomaduro/termwind/tree/v1.15.0" }, - "time": "2022-01-27T09:35:39+00:00" + "funding": [ + { + "url": "https://www.paypal.com/paypalme/enunomaduro", + "type": "custom" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://github.com/xiCO2k", + "type": "github" + } + ], + "time": "2022-12-20T19:00:15+00:00" }, { "name": "paragonie/random_compat", @@ -3158,6 +3479,7 @@ "support": { "source": "https://github.com/paypal/Checkout-PHP-SDK/tree/1.0.2" }, + "abandoned": true, "time": "2021-09-21T20:57:38+00:00" }, { @@ -3303,21 +3625,21 @@ }, { "name": "phenx/php-svg-lib", - "version": "0.4.1", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/dompdf/php-svg-lib.git", - "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02" + "reference": "76876c6cf3080bcb6f249d7d59705108166a6685" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/4498b5df7b08e8469f0f8279651ea5de9626ed02", - "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/76876c6cf3080bcb6f249d7d59705108166a6685", + "reference": "76876c6cf3080bcb6f249d7d59705108166a6685", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0", + "php": "^7.1 || ^8.0", "sabberworm/php-css-parser": "^8.4" }, "require-dev": { @@ -3343,9 +3665,9 @@ "homepage": "https://github.com/PhenX/php-svg-lib", "support": { "issues": "https://github.com/dompdf/php-svg-lib/issues", - "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.1" + "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.0" }, - "time": "2022-03-07T12:52:04+00:00" + "time": "2022-09-06T12:16:56+00:00" }, { "name": "phpoption/phpoption", @@ -3473,22 +3795,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -3515,9 +3842,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -3781,25 +4108,25 @@ }, { "name": "psr/simple-cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -3814,7 +4141,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -3826,22 +4153,22 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "time": "2017-10-23T01:57:42+00:00" + "time": "2021-10-29T13:26:27+00:00" }, { "name": "psy/psysh", - "version": "v0.11.8", + "version": "v0.11.10", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "f455acf3645262ae389b10e9beba0c358aa6994e" + "reference": "e9eadffbed9c9deb5426fd107faae0452bf20a36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/f455acf3645262ae389b10e9beba0c358aa6994e", - "reference": "f455acf3645262ae389b10e9beba0c358aa6994e", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e9eadffbed9c9deb5426fd107faae0452bf20a36", + "reference": "e9eadffbed9c9deb5426fd107faae0452bf20a36", "shasum": "" }, "require": { @@ -3902,9 +4229,79 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.11.8" + "source": "https://github.com/bobthecow/psysh/tree/v0.11.10" + }, + "time": "2022-12-23T17:47:18+00:00" + }, + { + "name": "qirolab/laravel-themer", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/qirolab/laravel-themer.git", + "reference": "9c4e17fe7334c921bf5c57395d926154cc25a1e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/qirolab/laravel-themer/zipball/9c4e17fe7334c921bf5c57395d926154cc25a1e8", + "reference": "9c4e17fe7334c921bf5c57395d926154cc25a1e8", + "shasum": "" + }, + "require": { + "facade/ignition-contracts": "^1.0", + "illuminate/support": "^9.19", + "php": ">=7.1.0" + }, + "require-dev": { + "orchestra/testbench": "^7.0", + "phpunit/phpunit": "^8.3|^9.0", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Qirolab\\Theme\\ThemeServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Qirolab\\Theme\\": "src", + "Qirolab\\Theme\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Harish Kumar", + "email": "harish@qirolab.com", + "homepage": "https://qirolab.com", + "role": "Developer" + } + ], + "description": "A Laravel theme manager, that will help you organize and maintain your themes inside Laravel projects.", + "homepage": "https://qirolab.com", + "keywords": [ + "laravel", + "laravel-theme", + "qirolab", + "theme" + ], + "support": { + "issues": "https://github.com/qirolab/laravel-themer/issues", + "source": "https://github.com/qirolab/laravel-themer/tree/2.0.2" }, - "time": "2022-07-28T14:25:11+00:00" + "funding": [ + { + "url": "https://www.buymeacoffee.com/qirolab", + "type": "other" + } + ], + "time": "2022-09-03T21:30:32+00:00" }, { "name": "ralouphie/getallheaders", @@ -3952,42 +4349,52 @@ }, { "name": "ramsey/collection", - "version": "1.2.2", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", - "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "url": "https://api.github.com/repos/ramsey/collection/zipball/a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", + "reference": "a4b48764bfbb8f3a6a4d1aeb1a35bb5e9ecac4a5", "shasum": "" }, "require": { - "php": "^7.3 || ^8", - "symfony/polyfill-php81": "^1.23" + "php": "^8.1" }, "require-dev": { - "captainhook/captainhook": "^5.3", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "ergebnis/composer-normalize": "^2.6", - "fakerphp/faker": "^1.5", - "hamcrest/hamcrest-php": "^2", - "jangregor/phpstan-prophecy": "^0.8", - "mockery/mockery": "^1.3", + "captainhook/plugin-composer": "^5.3", + "ergebnis/composer-normalize": "^2.28.3", + "fakerphp/faker": "^1.21", + "hamcrest/hamcrest-php": "^2.0", + "jangregor/phpstan-prophecy": "^1.0", + "mockery/mockery": "^1.5", + "php-parallel-lint/php-console-highlighter": "^1.0", + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpcsstandards/phpcsutils": "^1.0.0-rc1", "phpspec/prophecy-phpunit": "^2.0", - "phpstan/extension-installer": "^1", - "phpstan/phpstan": "^0.12.32", - "phpstan/phpstan-mockery": "^0.12.5", - "phpstan/phpstan-phpunit": "^0.12.11", - "phpunit/phpunit": "^8.5 || ^9", - "psy/psysh": "^0.10.4", - "slevomat/coding-standard": "^6.3", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.4" + "phpstan/extension-installer": "^1.2", + "phpstan/phpstan": "^1.9", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18.4", + "ramsey/coding-standard": "^2.0.3", + "ramsey/conventional-commits": "^1.3", + "vimeo/psalm": "^5.4" }, "type": "library", + "extra": { + "captainhook": { + "force-install": true + }, + "ramsey/conventional-commits": { + "configFile": "conventional-commits.json" + } + }, "autoload": { "psr-4": { "Ramsey\\Collection\\": "src/" @@ -4015,7 +4422,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.2" + "source": "https://github.com/ramsey/collection/tree/2.0.0" }, "funding": [ { @@ -4027,28 +4434,27 @@ "type": "tidelift" } ], - "time": "2021-10-10T03:01:02+00:00" + "time": "2022-12-31T21:50:55+00:00" }, { "name": "ramsey/uuid", - "version": "4.4.0", + "version": "4.7.1", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "373f7bacfcf3de038778ff27dcce5672ddbf4c8a" + "reference": "a1acf96007170234a8399586a6e2ab8feba109d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/373f7bacfcf3de038778ff27dcce5672ddbf4c8a", - "reference": "373f7bacfcf3de038778ff27dcce5672ddbf4c8a", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/a1acf96007170234a8399586a6e2ab8feba109d1", + "reference": "a1acf96007170234a8399586a6e2ab8feba109d1", "shasum": "" }, "require": { - "brick/math": "^0.8 || ^0.9 || ^0.10", - "ext-ctype": "*", + "brick/math": "^0.8.8 || ^0.9 || ^0.10", "ext-json": "*", "php": "^8.0", - "ramsey/collection": "^1.0" + "ramsey/collection": "^1.2 || ^2.0" }, "replace": { "rhumsaa/uuid": "self.version" @@ -4065,18 +4471,18 @@ "php-mock/php-mock-mockery": "^1.3", "php-parallel-lint/php-parallel-lint": "^1.1", "phpbench/phpbench": "^1.0", - "phpstan/extension-installer": "^1.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-mockery": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-mockery": "^1.1", + "phpstan/phpstan-phpunit": "^1.1", "phpunit/phpunit": "^8.5 || ^9", - "slevomat/coding-standard": "^7.0", + "ramsey/composer-repl": "^1.4", + "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.5", "vimeo/psalm": "^4.9" }, "suggest": { "ext-bcmath": "Enables faster math with arbitrary-precision integers using BCMath.", - "ext-ctype": "Enables faster processing of character classification using ctype functions.", "ext-gmp": "Enables faster math with arbitrary-precision integers using GMP.", "ext-uuid": "Enables the use of PeclUuidTimeGenerator and PeclUuidRandomGenerator.", "paragonie/random-lib": "Provides RandomLib for use with the RandomLibAdapter", @@ -4108,7 +4514,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.4.0" + "source": "https://github.com/ramsey/uuid/tree/4.7.1" }, "funding": [ { @@ -4120,7 +4526,7 @@ "type": "tidelift" } ], - "time": "2022-08-05T17:58:37+00:00" + "time": "2022-12-31T22:20:34+00:00" }, { "name": "sabberworm/php-css-parser", @@ -4218,22 +4624,22 @@ }, { "name": "socialiteproviders/manager", - "version": "v4.1.0", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/SocialiteProviders/Manager.git", - "reference": "4e63afbd26dc45ff263591de2a0970436a6a0bf9" + "reference": "738276dfbc2b68a9145db7b3df1588d53db528a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/4e63afbd26dc45ff263591de2a0970436a6a0bf9", - "reference": "4e63afbd26dc45ff263591de2a0970436a6a0bf9", + "url": "https://api.github.com/repos/SocialiteProviders/Manager/zipball/738276dfbc2b68a9145db7b3df1588d53db528a1", + "reference": "738276dfbc2b68a9145db7b3df1588d53db528a1", "shasum": "" }, "require": { "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0", - "laravel/socialite": "~4.0 || ~5.0", - "php": "^7.2 || ^8.0" + "laravel/socialite": "~5.0", + "php": "^7.4 || ^8.0" }, "require-dev": { "mockery/mockery": "^1.2", @@ -4288,32 +4694,33 @@ "issues": "https://github.com/socialiteproviders/manager/issues", "source": "https://github.com/socialiteproviders/manager" }, - "time": "2022-01-23T22:40:23+00:00" + "time": "2022-09-02T10:20:10+00:00" }, { "name": "spatie/laravel-activitylog", - "version": "3.17.0", + "version": "4.7.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-activitylog.git", - "reference": "bdc44862aaca39ecbd824133b80dbd7c8017ed7f" + "reference": "eee61436e2984119fd71fc338a45ec7d68e3b548" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-activitylog/zipball/bdc44862aaca39ecbd824133b80dbd7c8017ed7f", - "reference": "bdc44862aaca39ecbd824133b80dbd7c8017ed7f", + "url": "https://api.github.com/repos/spatie/laravel-activitylog/zipball/eee61436e2984119fd71fc338a45ec7d68e3b548", + "reference": "eee61436e2984119fd71fc338a45ec7d68e3b548", "shasum": "" }, "require": { - "illuminate/config": "^6.0 || ^7.0 || ^8.0", - "illuminate/database": "^6.0 || ^7.0 || ^8.0", - "illuminate/support": "^6.0 || ^7.0 || ^8.0", - "php": "^7.3 || ^8.0" + "illuminate/config": "^8.0 || ^9.0", + "illuminate/database": "^8.69 || ^9.27", + "illuminate/support": "^8.0 || ^9.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.6.3" }, "require-dev": { "ext-json": "*", - "orchestra/testbench": "^4.0 || ^5.0 || ^6.0", - "phpunit/phpunit": "^9.3" + "orchestra/testbench": "^6.23 || ^7.0", + "pestphp/pest": "^1.20" }, "type": "library", "extra": { @@ -4366,7 +4773,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-activitylog/issues", - "source": "https://github.com/spatie/laravel-activitylog/tree/3.17.0" + "source": "https://github.com/spatie/laravel-activitylog/tree/4.7.2" }, "funding": [ { @@ -4378,46 +4785,37 @@ "type": "github" } ], - "time": "2021-03-02T16:49:06+00:00" + "time": "2022-11-14T12:16:46+00:00" }, { - "name": "spatie/laravel-query-builder", - "version": "3.6.2", + "name": "spatie/laravel-package-tools", + "version": "1.13.8", "source": { "type": "git", - "url": "https://github.com/spatie/laravel-query-builder.git", - "reference": "3768381e9f2f80b01f0088eca49f061c269e0e8b" + "url": "https://github.com/spatie/laravel-package-tools.git", + "reference": "781a2f637237e69c277eb401063acf15e2b4156b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-query-builder/zipball/3768381e9f2f80b01f0088eca49f061c269e0e8b", - "reference": "3768381e9f2f80b01f0088eca49f061c269e0e8b", + "url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/781a2f637237e69c277eb401063acf15e2b4156b", + "reference": "781a2f637237e69c277eb401063acf15e2b4156b", "shasum": "" }, "require": { - "illuminate/database": "^6.20.13|^7.30.4|^8.22.2", - "illuminate/http": "^6.20.13|^7.30.4|^8.22.2", - "illuminate/support": "^6.20.13|^7.30.4|^8.22.2", - "php": "^7.3|^8.0" + "illuminate/contracts": "^9.28", + "php": "^8.0" }, "require-dev": { - "ext-json": "*", - "laravel/legacy-factories": "^1.0.4", - "mockery/mockery": "^1.4", - "orchestra/testbench": "^4.9|^5.8|^6.3", - "phpunit/phpunit": "^9.0" + "mockery/mockery": "^1.5", + "orchestra/testbench": "^7.7", + "pestphp/pest": "^1.22", + "phpunit/phpunit": "^9.5.24", + "spatie/pest-plugin-test-time": "^1.1" }, "type": "library", - "extra": { - "laravel": { - "providers": [ - "Spatie\\QueryBuilder\\QueryBuilderServiceProvider" - ] - } - }, "autoload": { "psr-4": { - "Spatie\\QueryBuilder\\": "src" + "Spatie\\LaravelPackageTools\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -4426,41 +4824,112 @@ ], "authors": [ { - "name": "Alex Vanderbist", - "email": "alex@spatie.be", - "homepage": "https://spatie.be", + "name": "Freek Van der Herten", + "email": "freek@spatie.be", "role": "Developer" } ], - "description": "Easily build Eloquent queries from API requests", - "homepage": "https://github.com/spatie/laravel-query-builder", + "description": "Tools for creating Laravel packages", + "homepage": "https://github.com/spatie/laravel-package-tools", "keywords": [ - "laravel-query-builder", + "laravel-package-tools", "spatie" ], "support": { - "issues": "https://github.com/spatie/laravel-query-builder/issues", - "source": "https://github.com/spatie/laravel-query-builder" + "issues": "https://github.com/spatie/laravel-package-tools/issues", + "source": "https://github.com/spatie/laravel-package-tools/tree/1.13.8" }, "funding": [ { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" + "url": "https://github.com/spatie", + "type": "github" } ], - "time": "2022-01-09T15:39:13+00:00" + "time": "2022-12-20T14:09:05+00:00" }, { - "name": "spatie/laravel-validation-rules", - "version": "3.2.1", + "name": "spatie/laravel-query-builder", + "version": "5.1.1", "source": { "type": "git", - "url": "https://github.com/spatie/laravel-validation-rules.git", - "reference": "47a63a724e10d72432d0dcdf438d1fecbc963bae" + "url": "https://github.com/spatie/laravel-query-builder.git", + "reference": "14a6802cd513cfd2abf68044cca5fd7391eb543d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-validation-rules/zipball/47a63a724e10d72432d0dcdf438d1fecbc963bae", + "url": "https://api.github.com/repos/spatie/laravel-query-builder/zipball/14a6802cd513cfd2abf68044cca5fd7391eb543d", + "reference": "14a6802cd513cfd2abf68044cca5fd7391eb543d", + "shasum": "" + }, + "require": { + "illuminate/database": "^9.0", + "illuminate/http": "^9.0", + "illuminate/support": "^9.0", + "php": "^8.0", + "spatie/laravel-package-tools": "^1.11" + }, + "require-dev": { + "ext-json": "*", + "mockery/mockery": "^1.4", + "orchestra/testbench": "^7.0", + "pestphp/pest": "^1.20", + "spatie/laravel-ray": "^1.28" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\QueryBuilder\\QueryBuilderServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\QueryBuilder\\": "src", + "Spatie\\QueryBuilder\\Database\\Factories\\": "database/factories" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alex Vanderbist", + "email": "alex@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "Easily build Eloquent queries from API requests", + "homepage": "https://github.com/spatie/laravel-query-builder", + "keywords": [ + "laravel-query-builder", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/laravel-query-builder/issues", + "source": "https://github.com/spatie/laravel-query-builder" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + } + ], + "time": "2022-12-02T21:28:40+00:00" + }, + { + "name": "spatie/laravel-validation-rules", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-validation-rules.git", + "reference": "47a63a724e10d72432d0dcdf438d1fecbc963bae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-validation-rules/zipball/47a63a724e10d72432d0dcdf438d1fecbc963bae", "reference": "47a63a724e10d72432d0dcdf438d1fecbc963bae", "shasum": "" }, @@ -4582,124 +5051,45 @@ }, "time": "2022-05-05T17:18:02+00:00" }, - { - "name": "swiftmailer/swiftmailer", - "version": "v6.3.0", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", - "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", - "shasum": "" - }, - "require": { - "egulias/email-validator": "^2.0|^3.1", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.4" - }, - "suggest": { - "ext-intl": "Needed to support internationalized email addresses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "support": { - "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", - "type": "tidelift" - } - ], - "abandoned": "symfony/mailer", - "time": "2021-10-18T15:26:12+00:00" - }, { "name": "symfony/console", - "version": "v5.4.11", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10" + "reference": "0f579613e771dba2dbb8211c382342a641f5da06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/535846c7ee6bc4dd027ca0d93220601456734b10", - "reference": "535846c7ee6bc4dd027ca0d93220601456734b10", + "url": "https://api.github.com/repos/symfony/console/zipball/0f579613e771dba2dbb8211c382342a641f5da06", + "reference": "0f579613e771dba2dbb8211c382342a641f5da06", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.1|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -4739,7 +5129,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.11" + "source": "https://github.com/symfony/console/tree/v6.2.3" }, "funding": [ { @@ -4755,24 +5145,24 @@ "type": "tidelift" } ], - "time": "2022-07-22T10:42:43+00:00" + "time": "2022-12-28T14:26:22+00:00" }, { "name": "symfony/css-selector", - "version": "v6.0.11", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "ab2746acddc4f03a7234c8441822ac5d5c63efe9" + "reference": "ab1df4ba3ded7b724766ba3a6e0eca0418e74f80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/ab2746acddc4f03a7234c8441822ac5d5c63efe9", - "reference": "ab2746acddc4f03a7234c8441822ac5d5c63efe9", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/ab1df4ba3ded7b724766ba3a6e0eca0418e74f80", + "reference": "ab1df4ba3ded7b724766ba3a6e0eca0418e74f80", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -4804,7 +5194,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.0.11" + "source": "https://github.com/symfony/css-selector/tree/v6.2.3" }, "funding": [ { @@ -4820,29 +5210,29 @@ "type": "tidelift" } ], - "time": "2022-06-27T17:10:44+00:00" + "time": "2022-12-28T14:26:22+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.0.2", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", - "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -4871,7 +5261,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -4887,31 +5277,31 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/error-handler", - "version": "v5.4.11", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8" + "reference": "0926124c95d220499e2baf0fb465772af3a4eddb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/f75d17cb4769eb38cd5fccbda95cd80a054d35c8", - "reference": "f75d17cb4769eb38cd5fccbda95cd80a054d35c8", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/0926124c95d220499e2baf0fb465772af3a4eddb", + "reference": "0926124c95d220499e2baf0fb465772af3a4eddb", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "symfony/var-dumper": "^5.4|^6.0" }, "require-dev": { "symfony/deprecation-contracts": "^2.1|^3", - "symfony/http-kernel": "^4.4|^5.0|^6.0", - "symfony/serializer": "^4.4|^5.0|^6.0" + "symfony/http-kernel": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" }, "bin": [ "Resources/bin/patch-type-declarations" @@ -4942,7 +5332,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.4.11" + "source": "https://github.com/symfony/error-handler/tree/v6.2.3" }, "funding": [ { @@ -4958,24 +5348,24 @@ "type": "tidelift" } ], - "time": "2022-07-29T07:37:50+00:00" + "time": "2022-12-19T14:33:49+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.0.9", + "version": "v6.2.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "5c85b58422865d42c6eb46f7693339056db098a8" + "reference": "3ffeb31139b49bf6ef0bc09d1db95eac053388d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5c85b58422865d42c6eb46f7693339056db098a8", - "reference": "5c85b58422865d42c6eb46f7693339056db098a8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3ffeb31139b49bf6ef0bc09d1db95eac053388d1", + "reference": "3ffeb31139b49bf6ef0bc09d1db95eac053388d1", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { @@ -5025,7 +5415,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.2" }, "funding": [ { @@ -5041,24 +5431,24 @@ "type": "tidelift" } ], - "time": "2022-05-05T16:45:52+00:00" + "time": "2022-12-14T16:11:27+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.0.2", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" + "reference": "0782b0b52a737a05b4383d0df35a474303cabdae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", - "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0782b0b52a737a05b4383d0df35a474303cabdae", + "reference": "0782b0b52a737a05b4383d0df35a474303cabdae", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "psr/event-dispatcher": "^1" }, "suggest": { @@ -5067,7 +5457,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -5104,7 +5494,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.0" }, "funding": [ { @@ -5120,26 +5510,27 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:55:41+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/finder", - "version": "v5.4.11", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c" + "reference": "81eefbddfde282ee33b437ba5e13d7753211ae8e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/7872a66f57caffa2916a584db1aa7f12adc76f8c", - "reference": "7872a66f57caffa2916a584db1aa7f12adc76f8c", + "url": "https://api.github.com/repos/symfony/finder/zipball/81eefbddfde282ee33b437ba5e13d7753211ae8e", + "reference": "81eefbddfde282ee33b437ba5e13d7753211ae8e", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" }, "type": "library", "autoload": { @@ -5167,7 +5558,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.11" + "source": "https://github.com/symfony/finder/tree/v6.2.3" }, "funding": [ { @@ -5183,41 +5574,53 @@ "type": "tidelift" } ], - "time": "2022-07-29T07:37:50+00:00" + "time": "2022-12-22T17:55:15+00:00" }, { - "name": "symfony/http-foundation", - "version": "v5.4.11", + "name": "symfony/http-client", + "version": "v6.2.2", "source": { "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "0a5868e0999e9d47859ba3d918548ff6943e6389" + "url": "https://github.com/symfony/http-client.git", + "reference": "7054ad466f836309aef511789b9c697bc986d8ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0a5868e0999e9d47859ba3d918548ff6943e6389", - "reference": "0a5868e0999e9d47859ba3d918548ff6943e6389", + "url": "https://api.github.com/repos/symfony/http-client/zipball/7054ad466f836309aef511789b9c697bc986d8ce", + "reference": "7054ad466f836309aef511789b9c697bc986d8ce", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", + "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1", - "symfony/polyfill-php80": "^1.16" + "symfony/http-client-contracts": "^3", + "symfony/service-contracts": "^1.0|^2|^3" }, - "require-dev": { - "predis/predis": "~1.0", - "symfony/cache": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/mime": "^4.4|^5.0|^6.0" + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "3.0" }, - "suggest": { - "symfony/mime": "To use the file extension guesser" + "require-dev": { + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", + "amphp/http-tunnel": "^1.0", + "amphp/socket": "^1.1", + "guzzlehttp/promises": "^1.4", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" + "Symfony\\Component\\HttpClient\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -5229,18 +5632,18 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Defines an object-oriented layer for the HTTP specification", + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.4.11" + "source": "https://github.com/symfony/http-client/tree/v6.2.2" }, "funding": [ { @@ -5256,83 +5659,44 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-12-14T16:11:27+00:00" }, { - "name": "symfony/http-kernel", - "version": "v5.4.11", + "name": "symfony/http-client-contracts", + "version": "v3.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "4fd590a2ef3f62560dbbf6cea511995dd77321ee" + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4fd590a2ef3f62560dbbf6cea511995dd77321ee", - "reference": "4fd590a2ef3f62560dbbf6cea511995dd77321ee", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/fd038f08c623ab5d22b26e9ba35afe8c79071800", + "reference": "fd038f08c623ab5d22b26e9ba35afe8c79071800", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/log": "^1|^2", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^5.0|^6.0", - "symfony/http-foundation": "^5.3.7|^6.0", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16" - }, - "conflict": { - "symfony/browser-kit": "<5.4", - "symfony/cache": "<5.0", - "symfony/config": "<5.0", - "symfony/console": "<4.4", - "symfony/dependency-injection": "<5.3", - "symfony/doctrine-bridge": "<5.0", - "symfony/form": "<5.0", - "symfony/http-client": "<5.0", - "symfony/mailer": "<5.0", - "symfony/messenger": "<5.0", - "symfony/translation": "<5.0", - "symfony/twig-bridge": "<5.0", - "symfony/validator": "<5.0", - "twig/twig": "<2.13" - }, - "provide": { - "psr/log-implementation": "1.0|2.0" - }, - "require-dev": { - "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/config": "^5.0|^6.0", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/css-selector": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^5.3|^6.0", - "symfony/dom-crawler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/finder": "^4.4|^5.0|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/routing": "^4.4|^5.0|^6.0", - "symfony/stopwatch": "^4.4|^5.0|^6.0", - "symfony/translation": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", - "twig/twig": "^2.13|^3.0.4" + "php": ">=8.1" }, "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" + "symfony/http-client-implementation": "" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, "autoload": { "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" + "Symfony\\Contracts\\HttpClient\\": "" }, "exclude-from-classmap": [ - "/Tests/" + "/Test/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -5341,18 +5705,26 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a structured process for converting a Request into a Response", + "description": "Generic abstractions related to HTTP clients", "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.4.11" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.1.1" }, "funding": [ { @@ -5368,41 +5740,47 @@ "type": "tidelift" } ], - "time": "2022-07-29T12:30:22+00:00" + "time": "2022-04-22T07:30:54+00:00" }, { - "name": "symfony/intl", - "version": "v5.4.11", + "name": "symfony/http-foundation", + "version": "v6.2.2", "source": { "type": "git", - "url": "https://github.com/symfony/intl.git", - "reference": "d305c0c1d31b30b3876e041804c35e49e5f8a96e" + "url": "https://github.com/symfony/http-foundation.git", + "reference": "ddf4dd35de1623e7c02013523e6c2137b67b636f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/intl/zipball/d305c0c1d31b30b3876e041804c35e49e5f8a96e", - "reference": "d305c0c1d31b30b3876e041804c35e49e5f8a96e", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ddf4dd35de1623e7c02013523e6c2137b67b636f", + "reference": "ddf4dd35de1623e7c02013523e6c2137b67b636f", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.1" + }, + "conflict": { + "symfony/cache": "<6.2" }, "require-dev": { - "symfony/filesystem": "^4.4|^5.0|^6.0" + "predis/predis": "~1.0", + "symfony/cache": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^5.4|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" }, "type": "library", "autoload": { - "files": [ - "Resources/functions.php" - ], "psr-4": { - "Symfony\\Component\\Intl\\": "" + "Symfony\\Component\\HttpFoundation\\": "" }, - "classmap": [ - "Resources/stubs" - ], "exclude-from-classmap": [ "/Tests/" ] @@ -5413,34 +5791,18 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - }, - { - "name": "Eriksen Costa", - "email": "eriksen.costa@infranology.com.br" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Provides a PHP replacement layer for the C intl extension that includes additional data from the ICU library", + "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", - "keywords": [ - "i18n", - "icu", - "internationalization", - "intl", - "l10n", - "localization" - ], "support": { - "source": "https://github.com/symfony/intl/tree/v5.4.11" + "source": "https://github.com/symfony/http-foundation/tree/v6.2.2" }, "funding": [ { @@ -5456,47 +5818,79 @@ "type": "tidelift" } ], - "time": "2022-07-20T11:34:24+00:00" + "time": "2022-12-14T16:11:27+00:00" }, { - "name": "symfony/mime", - "version": "v5.4.11", + "name": "symfony/http-kernel", + "version": "v6.2.4", "source": { "type": "git", - "url": "https://github.com/symfony/mime.git", - "reference": "3cd175cdcdb6db2e589e837dd46aff41027d9830" + "url": "https://github.com/symfony/http-kernel.git", + "reference": "74f2e638ec3fa0315443bd85fab7fc8066b77f83" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/3cd175cdcdb6db2e589e837dd46aff41027d9830", - "reference": "3cd175cdcdb6db2e589e837dd46aff41027d9830", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/74f2e638ec3fa0315443bd85fab7fc8066b77f83", + "reference": "74f2e638ec3fa0315443bd85fab7fc8066b77f83", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.1", + "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-php80": "^1.16" + "symfony/error-handler": "^6.1", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<1.4.0", - "symfony/mailer": "<4.4" + "symfony/browser-kit": "<5.4", + "symfony/cache": "<5.4", + "symfony/config": "<6.1", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<6.2", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<5.4", + "twig/twig": "<2.13" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "egulias/email-validator": "^2.1.10|^3.1", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/property-access": "^4.4|^5.1|^6.0", - "symfony/property-info": "^4.4|^5.1|^6.0", - "symfony/serializer": "^5.2|^6.0" + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/config": "^6.1", + "symfony/console": "^5.4|^6.0", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dependency-injection": "^6.2", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/process": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "" }, "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Mime\\": "" + "Symfony\\Component\\HttpKernel\\": "" }, "exclude-from-classmap": [ "/Tests/" @@ -5516,14 +5910,91 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Allows manipulating MIME messages", + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v6.2.4" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-12-29T19:05:08+00:00" + }, + { + "name": "symfony/intl", + "version": "v6.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/intl.git", + "reference": "04726ae6cec43582f7dfbfc67a313d1ecdd81c0f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/intl/zipball/04726ae6cec43582f7dfbfc67a313d1ecdd81c0f", + "reference": "04726ae6cec43582f7dfbfc67a313d1ecdd81c0f", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Intl\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Eriksen Costa", + "email": "eriksen.costa@infranology.com.br" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a PHP replacement layer for the C intl extension that includes additional data from the ICU library", "homepage": "https://symfony.com", "keywords": [ - "mime", - "mime-type" + "i18n", + "icu", + "internationalization", + "intl", + "l10n", + "localization" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.4.11" + "source": "https://github.com/symfony/intl/tree/v6.2.0" }, "funding": [ { @@ -5539,48 +6010,195 @@ "type": "tidelift" } ], - "time": "2022-07-20T11:34:24+00:00" + "time": "2022-11-02T09:08:04+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "name": "symfony/mailer", + "version": "v6.2.2", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "url": "https://github.com/symfony/mailer.git", + "reference": "b355ad81f1d2987c47dcd3b04d5dce669e1e62e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/mailer/zipball/b355ad81f1d2987c47dcd3b04d5dce669e1e62e6", + "reference": "b355ad81f1d2987c47dcd3b04d5dce669e1e62e6", "shasum": "" }, "require": { - "php": ">=7.1" + "egulias/email-validator": "^2.1.10|^3", + "php": ">=8.1", + "psr/event-dispatcher": "^1", + "psr/log": "^1|^2|^3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/mime": "^6.2", + "symfony/service-contracts": "^1.1|^2|^3" }, - "provide": { - "ext-ctype": "*" + "conflict": { + "symfony/http-kernel": "<5.4", + "symfony/messenger": "<6.2", + "symfony/mime": "<6.2", + "symfony/twig-bridge": "<6.2.1" }, - "suggest": { - "ext-ctype": "For best performance" + "require-dev": { + "symfony/console": "^5.4|^6.0", + "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/messenger": "^6.2", + "symfony/twig-bridge": "^6.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" + "autoload": { + "psr-4": { + "Symfony\\Component\\Mailer\\": "" }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } + ], + "description": "Helps sending emails", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailer/tree/v6.2.2" }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-12-14T16:11:27+00:00" + }, + { + "name": "symfony/mailgun-mailer", + "version": "v6.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/mailgun-mailer.git", + "reference": "c5364fbcf5581ba9eae569db12b380b9255ce238" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mailgun-mailer/zipball/c5364fbcf5581ba9eae569db12b380b9255ce238", + "reference": "c5364fbcf5581ba9eae569db12b380b9255ce238", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/mailer": "^5.4|^6.0" + }, + "require-dev": { + "symfony/http-client": "^5.4|^6.0" + }, + "type": "symfony-mailer-bridge", "autoload": { - "files": [ - "bootstrap.php" - ], "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" + "Symfony\\Component\\Mailer\\Bridge\\Mailgun\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } + ], + "description": "Symfony Mailgun Mailer Bridge", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/mailgun-mailer/tree/v6.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-10-09T08:55:40+00:00" + }, + { + "name": "symfony/mime", + "version": "v6.2.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "8c98bf40406e791043890a163f6f6599b9cfa1ed" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/8c98bf40406e791043890a163f6f6599b9cfa1ed", + "reference": "8c98bf40406e791043890a163f6f6599b9cfa1ed", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "conflict": { + "egulias/email-validator": "~3.0.0", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/mailer": "<5.4", + "symfony/serializer": "<6.2" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10|^3.1", + "league/html-to-markdown": "^5.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/serializer": "^6.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Mime\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -5588,24 +6206,22 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Allows manipulating MIME messages", "homepage": "https://symfony.com", "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" + "mime", + "mime-type" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/mime/tree/v6.2.2" }, "funding": [ { @@ -5621,35 +6237,35 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-12-14T16:38:10+00:00" }, { - "name": "symfony/polyfill-iconv", - "version": "v1.26.0", + "name": "symfony/polyfill-ctype", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "143f1881e655bebca1312722af8068de235ae5dc" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/143f1881e655bebca1312722af8068de235ae5dc", - "reference": "143f1881e655bebca1312722af8068de235ae5dc", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { "php": ">=7.1" }, "provide": { - "ext-iconv": "*" + "ext-ctype": "*" }, "suggest": { - "ext-iconv": "For best performance" + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5661,7 +6277,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" + "Symfony\\Polyfill\\Ctype\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -5670,25 +6286,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Iconv extension", + "description": "Symfony polyfill for ctype functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "iconv", + "ctype", "polyfill", - "portable", - "shim" + "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -5704,20 +6319,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "433d05519ce6990bf3530fba6957499d327395c2" + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", - "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { @@ -5729,7 +6344,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5769,7 +6384,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -5785,20 +6400,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8" + "reference": "639084e360537a19f9ee352433b84ce831f3d2da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/59a8d271f00dd0e4c2e518104cc7963f655a1aa8", - "reference": "59a8d271f00dd0e4c2e518104cc7963f655a1aa8", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da", + "reference": "639084e360537a19f9ee352433b84ce831f3d2da", "shasum": "" }, "require": { @@ -5812,7 +6427,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5856,7 +6471,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0" }, "funding": [ { @@ -5872,20 +6487,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", - "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { @@ -5897,7 +6512,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -5940,7 +6555,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -5956,20 +6571,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -5984,7 +6599,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6023,7 +6638,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -6039,20 +6654,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2" + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/bf44a9fd41feaac72b074de600314a93e2ae78e2", - "reference": "bf44a9fd41feaac72b074de600314a93e2ae78e2", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", + "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", "shasum": "" }, "require": { @@ -6061,7 +6676,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6099,7 +6714,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" }, "funding": [ { @@ -6115,99 +6730,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.26-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", "shasum": "" }, "require": { @@ -6216,7 +6752,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6261,7 +6797,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" }, "funding": [ { @@ -6277,29 +6813,35 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php81", - "version": "v1.26.0", + "name": "symfony/polyfill-uuid", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1" + "url": "https://github.com/symfony/polyfill-uuid.git", + "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/13f6d1271c663dc5ae9fb843a8f16521db7687a1", - "reference": "13f6d1271c663dc5ae9fb843a8f16521db7687a1", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/f3cf1a645c2734236ed1e2e671e273eeb3586166", + "reference": "f3cf1a645c2734236ed1e2e671e273eeb3586166", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-uuid": "*" + }, + "suggest": { + "ext-uuid": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -6311,11 +6853,8 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Uuid\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6323,24 +6862,24 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "GrĆ©goire Pineau", + "email": "lyrixx@lyrixx.info" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "description": "Symfony polyfill for uuid functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", "polyfill", "portable", - "shim" + "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.27.0" }, "funding": [ { @@ -6356,25 +6895,24 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", - "version": "v5.4.11", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1" + "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6e75fe6874cbc7e4773d049616ab450eff537bf1", - "reference": "6e75fe6874cbc7e4773d049616ab450eff537bf1", + "url": "https://api.github.com/repos/symfony/process/zipball/ba6e55359f8f755fe996c58a81e00eaa67a35877", + "reference": "ba6e55359f8f755fe996c58a81e00eaa67a35877", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -6402,7 +6940,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.11" + "source": "https://github.com/symfony/process/tree/v6.2.0" }, "funding": [ { @@ -6418,41 +6956,39 @@ "type": "tidelift" } ], - "time": "2022-06-27T16:58:25+00:00" + "time": "2022-11-02T09:08:04+00:00" }, { "name": "symfony/routing", - "version": "v5.4.11", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226" + "reference": "35fec764f3e2c8c08fb340d275c84bc78ca7e0c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/3e01ccd9b2a3a4167ba2b3c53612762300300226", - "reference": "3e01ccd9b2a3a4167ba2b3c53612762300300226", + "url": "https://api.github.com/repos/symfony/routing/zipball/35fec764f3e2c8c08fb340d275c84bc78ca7e0c9", + "reference": "35fec764f3e2c8c08fb340d275c84bc78ca7e0c9", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "conflict": { "doctrine/annotations": "<1.12", - "symfony/config": "<5.3", - "symfony/dependency-injection": "<4.4", - "symfony/yaml": "<4.4" + "symfony/config": "<6.2", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" }, "require-dev": { - "doctrine/annotations": "^1.12", + "doctrine/annotations": "^1.12|^2", "psr/log": "^1|^2|^3", - "symfony/config": "^5.3|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" + "symfony/config": "^6.2", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" }, "suggest": { "symfony/config": "For using the all-in-one router or any loader", @@ -6492,7 +7028,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v5.4.11" + "source": "https://github.com/symfony/routing/tree/v6.2.3" }, "funding": [ { @@ -6508,26 +7044,25 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-12-20T16:41:15+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/aac98028c69df04ee77eb69b96b86ee51fbf4b75", + "reference": "aac98028c69df04ee77eb69b96b86ee51fbf4b75", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.1", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -6538,7 +7073,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -6548,7 +7083,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6575,7 +7113,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.2.0" }, "funding": [ { @@ -6591,24 +7129,24 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/string", - "version": "v6.0.11", + "version": "v6.2.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "042b6bf0f6ccca6d456a0572eb788cfb8b1ff809" + "reference": "863219fd713fa41cbcd285a79723f94672faff4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/042b6bf0f6ccca6d456a0572eb788cfb8b1ff809", - "reference": "042b6bf0f6ccca6d456a0572eb788cfb8b1ff809", + "url": "https://api.github.com/repos/symfony/string/zipball/863219fd713fa41cbcd285a79723f94672faff4d", + "reference": "863219fd713fa41cbcd285a79723f94672faff4d", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", @@ -6620,6 +7158,7 @@ "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", "symfony/translation-contracts": "^2.0|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, @@ -6660,7 +7199,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.0.11" + "source": "https://github.com/symfony/string/tree/v6.2.2" }, "funding": [ { @@ -6676,24 +7215,24 @@ "type": "tidelift" } ], - "time": "2022-07-27T15:50:26+00:00" + "time": "2022-12-14T16:11:27+00:00" }, { "name": "symfony/translation", - "version": "v6.0.11", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "55ffbe4b690156100af1ae42e1f94c5873085bca" + "reference": "a2a15404ef4c15d92c205718eb828b225a144379" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/55ffbe4b690156100af1ae42e1f94c5873085bca", - "reference": "55ffbe4b690156100af1ae42e1f94c5873085bca", + "url": "https://api.github.com/repos/symfony/translation/zipball/a2a15404ef4c15d92c205718eb828b225a144379", + "reference": "a2a15404ef4c15d92c205718eb828b225a144379", "shasum": "" }, "require": { - "php": ">=8.0.2", + "php": ">=8.1", "symfony/polyfill-mbstring": "~1.0", "symfony/translation-contracts": "^2.3|^3.0" }, @@ -6709,6 +7248,7 @@ "symfony/translation-implementation": "2.3|3.0" }, "require-dev": { + "nikic/php-parser": "^4.13", "psr/log": "^1|^2|^3", "symfony/config": "^5.4|^6.0", "symfony/console": "^5.4|^6.0", @@ -6718,10 +7258,12 @@ "symfony/http-kernel": "^5.4|^6.0", "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", + "symfony/routing": "^5.4|^6.0", "symfony/service-contracts": "^1.1.2|^2|^3", "symfony/yaml": "^5.4|^6.0" }, "suggest": { + "nikic/php-parser": "To use PhpAstExtractor", "psr/log-implementation": "To use logging capability in translator", "symfony/config": "", "symfony/yaml": "" @@ -6755,7 +7297,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.0.11" + "source": "https://github.com/symfony/translation/tree/v6.2.3" }, "funding": [ { @@ -6771,24 +7313,24 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:45:53+00:00" + "time": "2022-12-23T14:11:11+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.0.2", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282" + "reference": "68cce71402305a015f8c1589bfada1280dc64fe7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/acbfbb274e730e5a0236f619b6168d9dedb3e282", - "reference": "acbfbb274e730e5a0236f619b6168d9dedb3e282", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/68cce71402305a015f8c1589bfada1280dc64fe7", + "reference": "68cce71402305a015f8c1589bfada1280dc64fe7", "shasum": "" }, "require": { - "php": ">=8.0.2" + "php": ">=8.1" }, "suggest": { "symfony/translation-implementation": "" @@ -6796,7 +7338,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.0-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -6806,7 +7348,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Translation\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -6833,7 +7378,81 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.0.2" + "source": "https://github.com/symfony/translation-contracts/tree/v3.2.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-25T10:21:52+00:00" + }, + { + "name": "symfony/uid", + "version": "v6.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/uid.git", + "reference": "4f9f537e57261519808a7ce1d941490736522bbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/uid/zipball/4f9f537e57261519808a7ce1d941490736522bbc", + "reference": "4f9f537e57261519808a7ce1d941490736522bbc", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-uuid": "^1.15" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Uid\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "GrĆ©goire Pineau", + "email": "lyrixx@lyrixx.info" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to generate and represent UIDs", + "homepage": "https://symfony.com", + "keywords": [ + "UID", + "ulid", + "uuid" + ], + "support": { + "source": "https://github.com/symfony/uid/tree/v6.2.0" }, "funding": [ { @@ -6849,36 +7468,35 @@ "type": "tidelift" } ], - "time": "2022-06-27T17:10:44+00:00" + "time": "2022-10-09T08:55:40+00:00" }, { "name": "symfony/var-dumper", - "version": "v5.4.11", + "version": "v6.2.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861" + "reference": "fdbadd4803bc3c96ef89238c9c9e2ebe424ec2e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8f306d7b8ef34fb3db3305be97ba8e088fb4861", - "reference": "b8f306d7b8ef34fb3db3305be97ba8e088fb4861", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/fdbadd4803bc3c96ef89238c9c9e2ebe424ec2e0", + "reference": "fdbadd4803bc3c96ef89238c9c9e2ebe424ec2e0", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1", + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { "phpunit/phpunit": "<5.4.3", - "symfony/console": "<4.4" + "symfony/console": "<5.4" }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/uid": "^5.1|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, "suggest": { @@ -6922,7 +7540,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.4.11" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.3" }, "funding": [ { @@ -6938,20 +7556,20 @@ "type": "tidelift" } ], - "time": "2022-07-20T13:00:38+00:00" + "time": "2022-12-22T17:55:15+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.4", + "version": "2.2.6", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c" + "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/da444caae6aca7a19c0c140f68c6182e337d5b1c", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/c42125b83a4fa63b187fdf29f9c93cb7733da30c", + "reference": "c42125b83a4fa63b187fdf29f9c93cb7733da30c", "shasum": "" }, "require": { @@ -6989,22 +7607,22 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.4" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.6" }, - "time": "2021-12-08T09:12:39+00:00" + "time": "2023-01-03T09:29:04+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v5.4.1", + "version": "v5.5.0", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f" + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/264dce589e7ce37a7ba99cb901eed8249fbec92f", - "reference": "264dce589e7ce37a7ba99cb901eed8249fbec92f", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", + "reference": "1a7ea2afc49c3ee6d87061f5a233e3a035d0eae7", "shasum": "" }, "require": { @@ -7019,15 +7637,19 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" + "phpunit/phpunit": "^7.5.20 || ^8.5.30 || ^9.5.25" }, "suggest": { "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": true + }, "branch-alias": { - "dev-master": "5.4-dev" + "dev-master": "5.5-dev" } }, "autoload": { @@ -7059,7 +7681,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.4.1" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.5.0" }, "funding": [ { @@ -7071,20 +7693,20 @@ "type": "tidelift" } ], - "time": "2021-12-12T23:22:04+00:00" + "time": "2022-10-16T01:01:54+00:00" }, { "name": "voku/portable-ascii", - "version": "1.6.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a" + "reference": "b56450eed252f6801410d810c8e1727224ae0743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/87337c91b9dfacee02452244ee14ab3c43bc485a", - "reference": "87337c91b9dfacee02452244ee14ab3c43bc485a", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b56450eed252f6801410d810c8e1727224ae0743", + "reference": "b56450eed252f6801410d810c8e1727224ae0743", "shasum": "" }, "require": { @@ -7121,7 +7743,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/1.6.1" + "source": "https://github.com/voku/portable-ascii/tree/2.0.1" }, "funding": [ { @@ -7145,7 +7767,7 @@ "type": "tidelift" } ], - "time": "2022-01-24T18:55:24+00:00" + "time": "2022-03-08T17:03:00+00:00" }, { "name": "webmozart/assert", @@ -7318,246 +7940,19 @@ "mockery/mockery": "^1.3.3", "orchestra/testbench-dusk": "^5|^6|^7", "phpunit/phpunit": "^8.5|^9.0", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.6-dev" - }, - "laravel": { - "providers": [ - "Barryvdh\\Debugbar\\ServiceProvider" - ], - "aliases": { - "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" - } - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Barryvdh\\Debugbar\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Barry vd. Heuvel", - "email": "barryvdh@gmail.com" - } - ], - "description": "PHP Debugbar integration for Laravel", - "keywords": [ - "debug", - "debugbar", - "laravel", - "profiler", - "webprofiler" - ], - "support": { - "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.7.0" - }, - "funding": [ - { - "url": "https://fruitcake.nl", - "type": "custom" - }, - { - "url": "https://github.com/barryvdh", - "type": "github" - } - ], - "time": "2022-07-11T09:26:42+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2022-03-03T08:28:38+00:00" - }, - { - "name": "facade/flare-client-php", - "version": "1.9.1", - "source": { - "type": "git", - "url": "https://github.com/facade/flare-client-php.git", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", - "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", - "shasum": "" - }, - "require": { - "facade/ignition-contracts": "~1.0", - "illuminate/pipeline": "^5.5|^6.0|^7.0|^8.0", - "php": "^7.1|^8.0", - "symfony/http-foundation": "^3.3|^4.1|^5.0", - "symfony/mime": "^3.4|^4.0|^5.1", - "symfony/var-dumper": "^3.4|^4.0|^5.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "phpunit/phpunit": "^7.5.16", - "spatie/phpunit-snapshot-assertions": "^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "files": [ - "src/helpers.php" - ], - "psr-4": { - "Facade\\FlareClient\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Send PHP errors to Flare", - "homepage": "https://github.com/facade/flare-client-php", - "keywords": [ - "exception", - "facade", - "flare", - "reporting" - ], - "support": { - "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.9.1" - }, - "funding": [ - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2021-09-13T12:16:46+00:00" - }, - { - "name": "facade/ignition", - "version": "2.17.6", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition.git", - "reference": "6acd82e986a2ecee89e2e68adfc30a1936d1ab7c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/6acd82e986a2ecee89e2e68adfc30a1936d1ab7c", - "reference": "6acd82e986a2ecee89e2e68adfc30a1936d1ab7c", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "facade/flare-client-php": "^1.9.1", - "facade/ignition-contracts": "^1.0.2", - "illuminate/support": "^7.0|^8.0", - "monolog/monolog": "^2.0", - "php": "^7.2.5|^8.0", - "symfony/console": "^5.0", - "symfony/var-dumper": "^5.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "livewire/livewire": "^2.4", - "mockery/mockery": "^1.3", - "orchestra/testbench": "^5.0|^6.0", - "psalm/plugin-laravel": "^1.2" - }, - "suggest": { - "laravel/telescope": "^3.1" + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev" + "dev-master": "3.6-dev" }, "laravel": { "providers": [ - "Facade\\Ignition\\IgnitionServiceProvider" + "Barryvdh\\Debugbar\\ServiceProvider" ], "aliases": { - "Flare": "Facade\\Ignition\\Facades\\Flare" + "Debugbar": "Barryvdh\\Debugbar\\Facades\\Debugbar" } } }, @@ -7566,55 +7961,74 @@ "src/helpers.php" ], "psr-4": { - "Facade\\Ignition\\": "src" + "Barryvdh\\Debugbar\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "A beautiful error page for Laravel applications.", - "homepage": "https://github.com/facade/ignition", + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "PHP Debugbar integration for Laravel", "keywords": [ - "error", - "flare", + "debug", + "debugbar", "laravel", - "page" + "profiler", + "webprofiler" ], "support": { - "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", - "forum": "https://twitter.com/flareappio", - "issues": "https://github.com/facade/ignition/issues", - "source": "https://github.com/facade/ignition" + "issues": "https://github.com/barryvdh/laravel-debugbar/issues", + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.7.0" }, - "time": "2022-06-30T18:26:59+00:00" + "funding": [ + { + "url": "https://fruitcake.nl", + "type": "custom" + }, + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2022-07-11T09:26:42+00:00" }, { - "name": "facade/ignition-contracts", - "version": "1.0.2", + "name": "doctrine/instantiator", + "version": "1.5.0", "source": { "type": "git", - "url": "https://github.com/facade/ignition-contracts.git", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/0a0fa9780f5d4e507415a065172d26a98d02047b", + "reference": "0a0fa9780f5d4e507415a065172d26a98d02047b", "shasum": "" }, "require": { - "php": "^7.3|^8.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v2.15.8", - "phpunit/phpunit": "^9.3.11", - "vimeo/psalm": "^3.17.1" + "doctrine/coding-standard": "^9 || ^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.30 || ^5.4" }, "type": "library", "autoload": { "psr-4": { - "Facade\\IgnitionContracts\\": "src" + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -7623,41 +8037,53 @@ ], "authors": [ { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://flareapp.io", - "role": "Developer" + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" } ], - "description": "Solution contracts for Ignition", - "homepage": "https://github.com/facade/ignition-contracts", + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", "keywords": [ - "contracts", - "flare", - "ignition" + "constructor", + "instantiate" ], "support": { - "issues": "https://github.com/facade/ignition-contracts/issues", - "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.5.0" }, - "time": "2020-10-16T08:27:54+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:15:36+00:00" }, { "name": "fakerphp/faker", - "version": "v1.20.0", + "version": "v1.21.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b" + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b", - "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/92efad6a967f0b79c499705c69b662f738cc9e4d", + "reference": "92efad6a967f0b79c499705c69b662f738cc9e4d", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", + "php": "^7.4 || ^8.0", "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2 || ^3.0" }, @@ -7668,7 +8094,8 @@ "bamarni/composer-bin-plugin": "^1.4.1", "doctrine/persistence": "^1.3 || ^2.0", "ext-intl": "*", - "symfony/phpunit-bridge": "^4.4 || ^5.2" + "phpunit/phpunit": "^9.5.26", + "symfony/phpunit-bridge": "^5.4.16" }, "suggest": { "doctrine/orm": "Required to use Faker\\ORM\\Doctrine", @@ -7680,7 +8107,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.20-dev" + "dev-main": "v1.21-dev" } }, "autoload": { @@ -7705,22 +8132,22 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.21.0" }, - "time": "2022-07-20T13:12:54+00:00" + "time": "2022-12-13T13:54:32+00:00" }, { "name": "filp/whoops", - "version": "2.14.5", + "version": "2.14.6", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc" + "reference": "f7948baaa0330277c729714910336383286305da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", - "reference": "a63e5e8f26ebbebf8ed3c5c691637325512eb0dc", + "url": "https://api.github.com/repos/filp/whoops/zipball/f7948baaa0330277c729714910336383286305da", + "reference": "f7948baaa0330277c729714910336383286305da", "shasum": "" }, "require": { @@ -7770,7 +8197,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.5" + "source": "https://github.com/filp/whoops/tree/2.14.6" }, "funding": [ { @@ -7778,7 +8205,7 @@ "type": "github" } ], - "time": "2022-01-07T12:00:00+00:00" + "time": "2022-11-02T16:23:29+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -7833,16 +8260,16 @@ }, { "name": "laravel/sail", - "version": "v1.15.1", + "version": "v1.17.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "2fe64c0b45a3af56cac0af638c8020a8adc860d7" + "reference": "7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/2fe64c0b45a3af56cac0af638c8020a8adc860d7", - "reference": "2fe64c0b45a3af56cac0af638c8020a8adc860d7", + "url": "https://api.github.com/repos/laravel/sail/zipball/7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80", + "reference": "7d69da7b2bdb8cbe8da6663eb2ae0e00c884bf80", "shasum": "" }, "require": { @@ -7889,20 +8316,20 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2022-07-21T14:33:56+00:00" + "time": "2022-12-22T14:46:08+00:00" }, { "name": "maximebf/debugbar", - "version": "v1.18.0", + "version": "v1.18.1", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6" + "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6", - "reference": "0d44b75f3b5d6d41ae83b79c7a4bceae7fbc78b6", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/ba0af68dd4316834701ecb30a00ce9604ced3ee9", + "reference": "ba0af68dd4316834701ecb30a00ce9604ced3ee9", "shasum": "" }, "require": { @@ -7922,7 +8349,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-master": "1.18-dev" } }, "autoload": { @@ -7953,22 +8380,22 @@ ], "support": { "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.0" + "source": "https://github.com/maximebf/php-debugbar/tree/v1.18.1" }, - "time": "2021-12-27T18:49:48+00:00" + "time": "2022-03-31T14:55:54+00:00" }, { "name": "mockery/mockery", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac" + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", "shasum": "" }, "require": { @@ -8025,9 +8452,9 @@ ], "support": { "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.0" + "source": "https://github.com/mockery/mockery/tree/1.5.1" }, - "time": "2022-01-20T13:18:17+00:00" + "time": "2022-09-07T15:32:08+00:00" }, { "name": "myclabs/deep-copy", @@ -8090,37 +8517,38 @@ }, { "name": "nunomaduro/collision", - "version": "v5.11.0", + "version": "v6.4.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461" + "reference": "f05978827b9343cba381ca05b8c7deee346b6015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/8b610eef8582ccdc05d8f2ab23305e2d37049461", - "reference": "8b610eef8582ccdc05d8f2ab23305e2d37049461", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/f05978827b9343cba381ca05b8c7deee346b6015", + "reference": "f05978827b9343cba381ca05b8c7deee346b6015", "shasum": "" }, "require": { - "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.14.3", - "php": "^7.3 || ^8.0", - "symfony/console": "^5.0" + "filp/whoops": "^2.14.5", + "php": "^8.0.0", + "symfony/console": "^6.0.2" }, "require-dev": { - "brianium/paratest": "^6.1", - "fideloper/proxy": "^4.4.1", - "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "8.x-dev", - "nunomaduro/larastan": "^0.6.2", - "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^6.0", - "phpstan/phpstan": "^0.12.64", - "phpunit/phpunit": "^9.5.0" + "brianium/paratest": "^6.4.1", + "laravel/framework": "^9.26.1", + "laravel/pint": "^1.1.1", + "nunomaduro/larastan": "^1.0.3", + "nunomaduro/mock-final-classes": "^1.1.0", + "orchestra/testbench": "^7.7", + "phpunit/phpunit": "^9.5.23", + "spatie/ignition": "^1.4.1" }, "type": "library", "extra": { + "branch-alias": { + "dev-develop": "6.x-dev" + }, "laravel": { "providers": [ "NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider" @@ -8173,7 +8601,7 @@ "type": "patreon" } ], - "time": "2022-01-10T16:22:52+00:00" + "time": "2023-01-03T12:54:54+00:00" }, { "name": "phar-io/manifest", @@ -8233,305 +8661,78 @@ "issues": "https://github.com/phar-io/manifest/issues", "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2021-07-20T11:28:43+00:00" - }, - { - "name": "phar-io/version", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.2.1" - }, - "time": "2022-02-21T01:04:05+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", - "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" - }, - "time": "2021-10-19T17:43:47+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.6.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "77a32518733312af16a44300404e945338981de3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/77a32518733312af16a44300404e945338981de3", - "reference": "77a32518733312af16a44300404e945338981de3", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*", - "psalm/phar": "^4.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.1" - }, - "time": "2022-03-15T21:29:03+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.15.0", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", - "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.2", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0 || ^7.0", - "phpunit/phpunit": "^8.0 || ^9.0" + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" }, { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2021-12-08T12:19:24+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.15", + "version": "9.2.23", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f" + "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2e9da11878c4202f97915c1cb4bb1ca318a63f5f", - "reference": "2e9da11878c4202f97915c1cb4bb1ca318a63f5f", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", + "reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.13.0", + "nikic/php-parser": "^4.14", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -8580,7 +8781,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.15" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23" }, "funding": [ { @@ -8588,7 +8789,7 @@ "type": "github" } ], - "time": "2022-03-07T09:28:20+00:00" + "time": "2022-12-28T12:41:10+00:00" }, { "name": "phpunit/php-file-iterator", @@ -8833,16 +9034,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.21", + "version": "9.5.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1" + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e32b76be457de00e83213528f6bb37e2a38fcb1", - "reference": "0e32b76be457de00e83213528f6bb37e2a38fcb1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a2bc7ffdca99f92d959b3f2270529334030bba38", + "reference": "a2bc7ffdca99f92d959b3f2270529334030bba38", "shasum": "" }, "require": { @@ -8857,7 +9058,6 @@ "phar-io/manifest": "^2.0.3", "phar-io/version": "^3.0.2", "php": ">=7.3", - "phpspec/prophecy": "^1.12.1", "phpunit/php-code-coverage": "^9.2.13", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", @@ -8865,19 +9065,16 @@ "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.0", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0.1" - }, "suggest": { "ext-soap": "*", "ext-xdebug": "*" @@ -8919,7 +9116,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.21" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.27" }, "funding": [ { @@ -8929,9 +9126,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-06-19T12:14:25+00:00" + "time": "2022-12-09T07:31:23+00:00" }, { "name": "sebastian/cli-parser", @@ -9102,16 +9303,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -9164,7 +9365,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -9172,7 +9373,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -9362,16 +9563,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -9427,7 +9628,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -9435,7 +9636,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -9790,16 +9991,16 @@ }, { "name": "sebastian/type", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", - "reference": "b233b84bc4465aff7b57cf1c4bc75c86d00d6dad", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -9811,7 +10012,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -9834,7 +10035,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.0.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -9842,7 +10043,7 @@ "type": "github" } ], - "time": "2022-03-15T09:54:48+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", @@ -9897,6 +10098,302 @@ ], "time": "2020-09-28T06:39:44+00:00" }, + { + "name": "spatie/backtrace", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/backtrace.git", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/backtrace/zipball/4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "reference": "4ee7d41aa5268107906ea8a4d9ceccde136dbd5b", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "ext-json": "*", + "phpunit/phpunit": "^9.3", + "symfony/var-dumper": "^5.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\Backtrace\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van de Herten", + "email": "freek@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "A better backtrace", + "homepage": "https://github.com/spatie/backtrace", + "keywords": [ + "Backtrace", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/backtrace/issues", + "source": "https://github.com/spatie/backtrace/tree/1.2.1" + }, + "funding": [ + { + "url": "https://github.com/sponsors/spatie", + "type": "github" + }, + { + "url": "https://spatie.be/open-source/support-us", + "type": "other" + } + ], + "time": "2021-11-09T10:57:15+00:00" + }, + { + "name": "spatie/flare-client-php", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/flare-client-php.git", + "reference": "609903bd154ba3d71f5e23a91c3b431fa8f71868" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/flare-client-php/zipball/609903bd154ba3d71f5e23a91c3b431fa8f71868", + "reference": "609903bd154ba3d71f5e23a91c3b431fa8f71868", + "shasum": "" + }, + "require": { + "illuminate/pipeline": "^8.0|^9.0", + "php": "^8.0", + "spatie/backtrace": "^1.2", + "symfony/http-foundation": "^5.0|^6.0", + "symfony/mime": "^5.2|^6.0", + "symfony/process": "^5.2|^6.0", + "symfony/var-dumper": "^5.2|^6.0" + }, + "require-dev": { + "dms/phpunit-arraysubset-asserts": "^0.3.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/phpunit-snapshot-assertions": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.1.x-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\FlareClient\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Send PHP errors to Flare", + "homepage": "https://github.com/spatie/flare-client-php", + "keywords": [ + "exception", + "flare", + "reporting", + "spatie" + ], + "support": { + "issues": "https://github.com/spatie/flare-client-php/issues", + "source": "https://github.com/spatie/flare-client-php/tree/1.3.2" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-12-26T14:36:46+00:00" + }, + { + "name": "spatie/ignition", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/ignition.git", + "reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/ignition/zipball/dd3d456779108d7078baf4e43f8c2b937d9794a1", + "reference": "dd3d456779108d7078baf4e43f8c2b937d9794a1", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "monolog/monolog": "^2.0", + "php": "^8.0", + "spatie/flare-client-php": "^1.1", + "symfony/console": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "require-dev": { + "mockery/mockery": "^1.4", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spatie\\Ignition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for PHP applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/ignition/issues", + "source": "https://github.com/spatie/ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2022-08-26T11:51:15+00:00" + }, + { + "name": "spatie/laravel-ignition", + "version": "1.6.4", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-ignition.git", + "reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-ignition/zipball/1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", + "reference": "1a2b4bd3d48c72526c0ba417687e5c56b5cf49bc", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "illuminate/support": "^8.77|^9.27", + "monolog/monolog": "^2.3", + "php": "^8.0", + "spatie/flare-client-php": "^1.0.1", + "spatie/ignition": "^1.4.1", + "symfony/console": "^5.0|^6.0", + "symfony/var-dumper": "^5.0|^6.0" + }, + "require-dev": { + "filp/whoops": "^2.14", + "livewire/livewire": "^2.8|dev-develop", + "mockery/mockery": "^1.4", + "nunomaduro/larastan": "^1.0", + "orchestra/testbench": "^6.23|^7.0", + "pestphp/pest": "^1.20", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/laravel-ray": "^1.27" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\LaravelIgnition\\IgnitionServiceProvider" + ], + "aliases": { + "Flare": "Spatie\\LaravelIgnition\\Facades\\Flare" + } + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Spatie\\LaravelIgnition\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Spatie", + "email": "info@spatie.be", + "role": "Developer" + } + ], + "description": "A beautiful error page for Laravel applications.", + "homepage": "https://flareapp.io/ignition", + "keywords": [ + "error", + "flare", + "laravel", + "page" + ], + "support": { + "docs": "https://flareapp.io/docs/ignition-for-laravel/introduction", + "forum": "https://twitter.com/flareappio", + "issues": "https://github.com/spatie/laravel-ignition/issues", + "source": "https://github.com/spatie/laravel-ignition" + }, + "funding": [ + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-01-03T19:28:04+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.1", diff --git a/config/activitylog.php b/config/activitylog.php new file mode 100644 index 000000000..5f6afcfa1 --- /dev/null +++ b/config/activitylog.php @@ -0,0 +1,52 @@ + env('ACTIVITY_LOGGER_ENABLED', true), + + /* + * When the clean-command is executed, all recording activities older than + * the number of days specified here will be deleted. + */ + 'delete_records_older_than_days' => 365, + + /* + * If no log name is passed to the activity() helper + * we use this default log name. + */ + 'default_log_name' => 'default', + + /* + * You can specify an auth driver here that gets user models. + * If this is null we'll use the current Laravel auth driver. + */ + 'default_auth_driver' => null, + + /* + * If set to true, the subject returns soft deleted models. + */ + 'subject_returns_soft_deleted_models' => false, + + /* + * This model will be used to log activity. + * It should implement the Spatie\Activitylog\Contracts\Activity interface + * and extend Illuminate\Database\Eloquent\Model. + */ + 'activity_model' => \Spatie\Activitylog\Models\Activity::class, + + /* + * This is the name of the table that will be created by the migration and + * used by the Activity model shipped with this package. + */ + 'table_name' => 'activity_log', + + /* + * This is the database connection that will be used by the migration and + * the Activity model shipped with this package. In case it's not set + * Laravel's database.default will be used instead. + */ + 'database_connection' => env('ACTIVITY_LOGGER_DB_CONNECTION'), +]; diff --git a/config/app.php b/config/app.php index 19e226d86..208e87ba2 100644 --- a/config/app.php +++ b/config/app.php @@ -1,8 +1,10 @@ '0.8.3.2', + 'version' => '0.9', /* |-------------------------------------------------------------------------- @@ -41,7 +43,7 @@ | */ - 'debug' => (bool)env('APP_DEBUG', false), + 'debug' => (bool) env('APP_DEBUG', false), /* |-------------------------------------------------------------------------- @@ -71,7 +73,6 @@ 'timezone' => env('APP_TIMEZONE', 'UTC'), - /* |-------------------------------------------------------------------------- | Application Locale Configuration @@ -83,7 +84,7 @@ | */ - 'locale' => "en", + 'locale' => 'en', /* |-------------------------------------------------------------------------- @@ -96,8 +97,7 @@ | */ - 'available_locales' => array_map('basename', preg_replace('/\\.[^.\\s]{3,4}$/', '', glob(resource_path() . "/lang/*.json", GLOB_BRACE))), - + 'available_locales' => array_map('basename', preg_replace('/\\.[^.\\s]{3,4}$/', '', glob(base_path("lang").'/*.json', GLOB_BRACE))), /* |-------------------------------------------------------------------------- @@ -140,6 +140,24 @@ 'cipher' => 'AES-256-CBC', + /* + |-------------------------------------------------------------------------- + | Maintenance Mode Driver + |-------------------------------------------------------------------------- + | + | These configuration options determine the driver used to determine and + | manage Laravel's "maintenance mode" status. The "cache" driver will + | allow maintenance mode to be controlled across multiple machines. + | + | Supported drivers: "file", "cache" + | + */ + + 'maintenance' => [ + 'driver' => 'file', + // 'store' => 'redis', + ], + /* |-------------------------------------------------------------------------- | Autoloaded Service Providers @@ -179,7 +197,6 @@ Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, - /* * Package Service Providers... */ @@ -196,7 +213,6 @@ KKomelin\TranslatableStringExporter\Providers\ExporterServiceProvider::class, - ], /* @@ -210,46 +226,8 @@ | */ - 'aliases' => [ - - 'App' => Illuminate\Support\Facades\App::class, - 'Arr' => Illuminate\Support\Arr::class, - 'Artisan' => Illuminate\Support\Facades\Artisan::class, - 'Auth' => Illuminate\Support\Facades\Auth::class, - 'Blade' => Illuminate\Support\Facades\Blade::class, - 'Broadcast' => Illuminate\Support\Facades\Broadcast::class, - 'Bus' => Illuminate\Support\Facades\Bus::class, - 'Cache' => Illuminate\Support\Facades\Cache::class, - 'Config' => Illuminate\Support\Facades\Config::class, - 'Cookie' => Illuminate\Support\Facades\Cookie::class, - 'Crypt' => Illuminate\Support\Facades\Crypt::class, - 'DB' => Illuminate\Support\Facades\DB::class, - 'Eloquent' => Illuminate\Database\Eloquent\Model::class, - 'Event' => Illuminate\Support\Facades\Event::class, - 'File' => Illuminate\Support\Facades\File::class, - 'Gate' => Illuminate\Support\Facades\Gate::class, - 'Hash' => Illuminate\Support\Facades\Hash::class, - 'Http' => Illuminate\Support\Facades\Http::class, - 'Lang' => Illuminate\Support\Facades\Lang::class, - 'Log' => Illuminate\Support\Facades\Log::class, - 'Mail' => Illuminate\Support\Facades\Mail::class, - 'Notification' => Illuminate\Support\Facades\Notification::class, - 'Password' => Illuminate\Support\Facades\Password::class, - 'Queue' => Illuminate\Support\Facades\Queue::class, - 'Redirect' => Illuminate\Support\Facades\Redirect::class, - // 'Redis' => Illuminate\Support\Facades\Redis::class, - 'Request' => Illuminate\Support\Facades\Request::class, - 'Response' => Illuminate\Support\Facades\Response::class, - 'Route' => Illuminate\Support\Facades\Route::class, - 'Schema' => Illuminate\Support\Facades\Schema::class, - 'Session' => Illuminate\Support\Facades\Session::class, - 'Storage' => Illuminate\Support\Facades\Storage::class, - 'Str' => Illuminate\Support\Str::class, - 'URL' => Illuminate\Support\Facades\URL::class, - 'Validator' => Illuminate\Support\Facades\Validator::class, - 'View' => Illuminate\Support\Facades\View::class, + 'aliases' => Facade::defaultAliases()->merge([ 'DataTables' => Yajra\DataTables\Facades\DataTables::class, - - ], + ])->toArray(), ]; diff --git a/config/auth.php b/config/auth.php index ba1a4d8cb..963c5ee73 100644 --- a/config/auth.php +++ b/config/auth.php @@ -31,7 +31,7 @@ | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | - | Supported: "session", "token" + | Supported: "session" | */ @@ -86,7 +86,7 @@ | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | - | The expire time is the number of minutes that the reset token should be + | The expire time is the number of minutes that each reset token will be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | diff --git a/config/broadcasting.php b/config/broadcasting.php index ef2085985..9e4d4aa44 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -11,7 +11,7 @@ | framework when an event needs to be broadcast. You may set this to | any of the connections defined in the "connections" array below. | - | Supported: "pusher", "redis", "log", "null" + | Supported: "pusher", "ably", "redis", "log", "null" | */ @@ -36,8 +36,14 @@ 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ - 'cluster' => env('PUSHER_APP_CLUSTER'), - 'useTLS' => true, + 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com', + 'port' => env('PUSHER_PORT', 443), + 'scheme' => env('PUSHER_SCHEME', 'https'), + 'encrypted' => true, + 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https', + ], + 'client_options' => [ + // Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html ], ], diff --git a/config/cache.php b/config/cache.php index e32a2fd3b..33bb29546 100644 --- a/config/cache.php +++ b/config/cache.php @@ -27,7 +27,7 @@ | same cache driver to group types of items stored in your caches. | | Supported drivers: "apc", "array", "database", "file", - | "memcached", "redis", "dynamodb", "null" + | "memcached", "redis", "dynamodb", "octane", "null" | */ @@ -88,6 +88,10 @@ 'endpoint' => env('DYNAMODB_ENDPOINT'), ], + 'octane' => [ + 'driver' => 'octane', + ], + ], /* @@ -95,12 +99,12 @@ | Cache Key Prefix |-------------------------------------------------------------------------- | - | When utilizing a RAM based store such as APC or Memcached, there might - | be other applications utilizing the same cache. So, we'll specify a - | value to get prefixed to all our keys so we can avoid collisions. + | When utilizing the APC, database, memcached, Redis, or DynamoDB cache + | stores there might be other applications using the same cache. For + | that reason, you may prefix every cache key to avoid collisions. | */ - 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), + 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'), ]; diff --git a/config/currency_codes.php b/config/currency_codes.php index 6fee59c72..5c3800f4b 100644 --- a/config/currency_codes.php +++ b/config/currency_codes.php @@ -1,5 +1,5 @@ 'utf8', 'prefix' => '', 'prefix_indexes' => true, - 'schema' => 'public', + 'search_path' => 'public', 'sslmode' => 'prefer', ], diff --git a/config/filesystems.php b/config/filesystems.php index 2f9c7e7c1..f7483fdf5 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -13,7 +13,7 @@ | */ - 'default' => env('FILESYSTEM_DRIVER', 'local'), + 'default' => env('FILESYSTEM_DISK', 'local'), /* |-------------------------------------------------------------------------- @@ -22,7 +22,7 @@ | | Here you may configure as many filesystem "disks" as you wish, and you | may even configure multiple disks of the same driver. Defaults have - | been setup for each driver as an example of the required options. + | been set up for each driver as an example of the required values. | | Supported Drivers: "local", "ftp", "sftp", "s3" | @@ -33,6 +33,7 @@ 'local' => [ 'driver' => 'local', 'root' => storage_path('app'), + 'throw' => false, ], 'logs' => [ @@ -45,9 +46,9 @@ 'root' => storage_path('app/public'), 'url' => env('APP_URL').'/storage', 'visibility' => 'public', + 'throw' => false, ], - 's3' => [ 'driver' => 's3', 'key' => env('AWS_ACCESS_KEY_ID'), @@ -56,6 +57,8 @@ 'bucket' => env('AWS_BUCKET'), 'url' => env('AWS_URL'), 'endpoint' => env('AWS_ENDPOINT'), + 'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false), + 'throw' => false, ], ], diff --git a/config/hashing.php b/config/hashing.php index 842577087..bcd3be4c2 100644 --- a/config/hashing.php +++ b/config/hashing.php @@ -44,9 +44,9 @@ */ 'argon' => [ - 'memory' => 1024, - 'threads' => 2, - 'time' => 2, + 'memory' => 65536, + 'threads' => 1, + 'time' => 4, ], ]; diff --git a/config/invoices.php b/config/invoices.php index 772ef1fde..7944c13d9 100644 --- a/config/invoices.php +++ b/config/invoices.php @@ -13,13 +13,13 @@ ], 'serial_number' => [ - 'series' => 'AA', + 'series' => 'AA', 'sequence' => 1, /* * Sequence will be padded accordingly, for ex. 00001 */ 'sequence_padding' => 5, - 'delimiter' => '.', + 'delimiter' => '.', /* * Supported tags {SERIES}, {DELIMITER}, {SEQUENCE} * Example: AA.00001 @@ -36,7 +36,7 @@ * Example: Amount in words: Eight hundred fifty thousand sixty-eight EUR and fifteen ct. */ 'fraction' => 'ct.', - 'symbol' => 'ā‚¬', + 'symbol' => 'ā‚¬', /* * Example: 19.00 */ @@ -59,7 +59,7 @@ 'paper' => [ // A4 = 210 mm x 297 mm = 595 pt x 842 pt - 'size' => 'a4', + 'size' => 'a4', 'orientation' => 'portrait', ], @@ -78,11 +78,11 @@ * Default attributes for Seller::class */ 'attributes' => [ - 'name' => 'Towne, Smith and Ebert', - 'address' => '89982 Pfeffer Falls Damianstad, CO 66972-8160', - 'code' => '41-1985581', - 'vat' => '123456789', - 'phone' => '760-355-3930', + 'name' => 'Towne, Smith and Ebert', + 'address' => '89982 Pfeffer Falls Damianstad, CO 66972-8160', + 'code' => '41-1985581', + 'vat' => '123456789', + 'phone' => '760-355-3930', 'custom_fields' => [ /* * Custom attributes for Seller::class diff --git a/config/logging.php b/config/logging.php index 6aa77fe28..5aa1dbb78 100644 --- a/config/logging.php +++ b/config/logging.php @@ -19,6 +19,22 @@ 'default' => env('LOG_CHANNEL', 'stack'), + /* + |-------------------------------------------------------------------------- + | Deprecations Log Channel + |-------------------------------------------------------------------------- + | + | This option controls the log channel that should be used to log warnings + | regarding deprecated PHP and library features. This allows you to get + | your application ready for upcoming major versions of dependencies. + | + */ + + 'deprecations' => [ + 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'), + 'trace' => false, + ], + /* |-------------------------------------------------------------------------- | Log Channels @@ -65,15 +81,17 @@ 'papertrail' => [ 'driver' => 'monolog', 'level' => env('LOG_LEVEL', 'debug'), - 'handler' => SyslogUdpHandler::class, + 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class), 'handler_with' => [ 'host' => env('PAPERTRAIL_URL'), 'port' => env('PAPERTRAIL_PORT'), + 'connectionString' => 'tls://'.env('PAPERTRAIL_URL').':'.env('PAPERTRAIL_PORT'), ], ], 'stderr' => [ 'driver' => 'monolog', + 'level' => env('LOG_LEVEL', 'debug'), 'handler' => StreamHandler::class, 'formatter' => env('LOG_STDERR_FORMATTER'), 'with' => [ diff --git a/config/mail.php b/config/mail.php index 3addd6aa8..534395a36 100644 --- a/config/mail.php +++ b/config/mail.php @@ -29,7 +29,7 @@ | mailers below. You are free to add additional mailers as required. | | Supported: "smtp", "sendmail", "mailgun", "ses", - | "postmark", "log", "array" + | "postmark", "log", "array", "failover" | */ @@ -42,25 +42,42 @@ 'username' => env('MAIL_USERNAME'), 'password' => env('MAIL_PASSWORD'), 'timeout' => null, - 'auth_mode' => null, + 'local_domain' => env('MAIL_EHLO_DOMAIN'), ], - // 'ses' => [ - // 'transport' => 'ses', - // ], - // - // 'mailgun' => [ - // 'transport' => 'mailgun', - // ], - // - // 'postmark' => [ - // 'transport' => 'postmark', - // ], - // - // 'sendmail' => [ - // 'transport' => 'sendmail', - // 'path' => '/usr/sbin/sendmail -bs', - // ], + 'ses' => [ + 'transport' => 'ses', + ], + + 'mailgun' => [ + 'transport' => 'mailgun', + ], + + 'postmark' => [ + 'transport' => 'postmark', + ], + + 'sendmail' => [ + 'transport' => 'sendmail', + 'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'), + ], + + 'log' => [ + 'transport' => 'log', + 'channel' => env('MAIL_LOG_CHANNEL'), + ], + + 'array' => [ + 'transport' => 'array', + ], + + 'failover' => [ + 'transport' => 'failover', + 'mailers' => [ + 'smtp', + 'log', + ], + ], ], /* diff --git a/config/queue.php b/config/queue.php index 122229666..25ea5a819 100644 --- a/config/queue.php +++ b/config/queue.php @@ -39,6 +39,7 @@ 'table' => 'jobs', 'queue' => 'default', 'retry_after' => 90, + 'after_commit' => false, ], 'beanstalkd' => [ @@ -47,6 +48,7 @@ 'queue' => 'default', 'retry_after' => 90, 'block_for' => 0, + 'after_commit' => false, ], 'sqs' => [ @@ -54,9 +56,10 @@ 'key' => env('AWS_ACCESS_KEY_ID'), 'secret' => env('AWS_SECRET_ACCESS_KEY'), 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'), - 'queue' => env('SQS_QUEUE', 'your-queue-name'), + 'queue' => env('SQS_QUEUE', 'default'), 'suffix' => env('SQS_SUFFIX'), 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'), + 'after_commit' => false, ], 'redis' => [ @@ -65,6 +68,7 @@ 'queue' => env('REDIS_QUEUE', 'default'), 'retry_after' => 90, 'block_for' => null, + 'after_commit' => false, ], ], diff --git a/config/recaptcha.php b/config/recaptcha.php index be52269fc..ce76c3e17 100644 --- a/config/recaptcha.php +++ b/config/recaptcha.php @@ -14,134 +14,119 @@ return [ /** - * * The site key * get site key @ www.google.com/recaptcha/admin - * */ - 'api_site_key' => env('RECAPTCHA_SITE_KEY', ''), + 'api_site_key' => env('RECAPTCHA_SITE_KEY', ''), /** - * * The secret key * get secret key @ www.google.com/recaptcha/admin - * */ - 'api_secret_key' => env('RECAPTCHA_SECRET_KEY', ''), + 'api_secret_key' => env('RECAPTCHA_SECRET_KEY', ''), /** - * * ReCATCHA version * Supported: "v2", "invisible", "v3", * * get more info @ https://developers.google.com/recaptcha/docs/versions - * */ - 'version' => 'v2', + 'version' => 'v2', /** - * * The curl timout in seconds to validate a recaptcha token - * @since v3.5.0 * + * @since v3.5.0 */ - 'curl_timeout' => 10, + 'curl_timeout' => 10, /** - * * IP addresses for which validation will be skipped - * */ - 'skip_ip' => [], + 'skip_ip' => [], /** - * * Default route called to check the Google reCAPTCHA token - * @since v3.2.0 * + * @since v3.2.0 */ - 'default_validation_route' => 'biscolab-recaptcha/validate', + 'default_validation_route' => 'biscolab-recaptcha/validate', /** - * * The name of the parameter used to send Google reCAPTCHA token to verify route - * @since v3.2.0 * + * @since v3.2.0 */ 'default_token_parameter_name' => 'token', /** - * * The default Google reCAPTCHA language code * It has no effect with v3 + * * @see https://developers.google.com/recaptcha/docs/language * @since v3.6.0 - * */ - 'default_language' => null, + 'default_language' => null, /** - * * The default form ID. Only for "invisible" reCAPTCHA - * @since v4.0.0 * + * @since v4.0.0 */ - 'default_form_id' => 'biscolab-recaptcha-invisible-form', + 'default_form_id' => 'biscolab-recaptcha-invisible-form', /** - * * Deferring the render can be achieved by specifying your onload callback function and adding parameters to the JavaScript resource. * It has no effect with v3 and invisible + * * @see https://developers.google.com/recaptcha/docs/display#explicit_render * @since v4.0.0 * Supported true, false - * */ - 'explicit' => false, + 'explicit' => false, /** - * * Set API domain. You can use "www.recaptcha.net" in case "www.google.com" is not accessible. * (no check will be made on the entered value) + * * @see https://developers.google.com/recaptcha/docs/faq#can-i-use-recaptcha-globally * @since v4.3.0 * Default 'www.google.com' (ReCaptchaBuilder::DEFAULT_RECAPTCHA_API_DOMAIN) - * */ - 'api_domain' => 'www.google.com', + 'api_domain' => 'www.google.com', /** - * * g-recaptcha tag attributes and grecaptcha.render parameters (v2 only) + * * @see https://developers.google.com/recaptcha/docs/display#render_param * @since v4.0.0 */ - 'tag_attributes' => [ + 'tag_attributes' => [ /** * The color theme of the widget. * Supported "light", "dark" */ - 'theme' => 'dark', + 'theme' => 'dark', /** * The size of the widget. * Supported "normal", "compact" */ - 'size' => 'normal', + 'size' => 'normal', /** * The tabindex of the widget and challenge. * If other elements in your page use tabindex, it should be set to make user navigation easier. */ - 'tabindex' => 0, + 'tabindex' => 0, /** * The name of your callback function, executed when the user submits a successful response. * The g-recaptcha-response token is passed to your callback. * DO NOT SET "biscolabOnloadCallback" */ - 'callback' => null, + 'callback' => null, /** * The name of your callback function, executed when the reCAPTCHA response expires and the user needs to re-verify. @@ -154,6 +139,6 @@ * If you specify a function here, you are responsible for informing the user that they should retry. * DO NOT SET "biscolabOnloadCallback" */ - 'error-callback' => null, - ] + 'error-callback' => null, + ], ]; diff --git a/config/services.php b/config/services.php index 5cfe58405..aedb7007c 100644 --- a/config/services.php +++ b/config/services.php @@ -18,6 +18,7 @@ 'domain' => env('MAILGUN_DOMAIN'), 'secret' => env('MAILGUN_SECRET'), 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), + 'scheme' => 'https', ], 'postmark' => [ @@ -33,10 +34,10 @@ 'discord' => [ 'client_id' => env('DISCORD_CLIENT_ID'), 'client_secret' => env('DISCORD_CLIENT_SECRET'), - 'redirect' => env('APP_URL' , 'http://localhost') . "/auth/callback", + 'redirect' => env('APP_URL', 'http://localhost').'/auth/callback', // optional - 'allow_gif_avatars' => (bool)env('DISCORD_AVATAR_GIF', true), + 'allow_gif_avatars' => (bool) env('DISCORD_AVATAR_GIF', true), 'avatar_default_extension' => env('DISCORD_EXTENSION_DEFAULT', 'jpg'), // only pick from jpg, png, webp ], diff --git a/config/session.php b/config/session.php index a9ea6ba79..8fed97c01 100644 --- a/config/session.php +++ b/config/session.php @@ -31,7 +31,7 @@ | */ - 'lifetime' => env('SESSION_LIFETIME', 240), + 'lifetime' => env('SESSION_LIFETIME', 120), 'expire_on_close' => false, @@ -72,7 +72,7 @@ | */ - 'connection' => env('SESSION_CONNECTION', null), + 'connection' => env('SESSION_CONNECTION'), /* |-------------------------------------------------------------------------- @@ -100,7 +100,7 @@ | */ - 'store' => env('SESSION_STORE', null), + 'store' => env('SESSION_STORE'), /* |-------------------------------------------------------------------------- @@ -155,7 +155,7 @@ | */ - 'domain' => env('SESSION_DOMAIN', null), + 'domain' => env('SESSION_DOMAIN'), /* |-------------------------------------------------------------------------- @@ -164,7 +164,7 @@ | | By setting this option to true, session cookies will only be sent back | to the server if the browser has a HTTPS connection. This will keep - | the cookie from being sent to you if it can not be done securely. + | the cookie from being sent to you when it can't be done securely. | */ diff --git a/config/theme.php b/config/theme.php new file mode 100644 index 000000000..6cabba755 --- /dev/null +++ b/config/theme.php @@ -0,0 +1,34 @@ + null, + + /* + |-------------------------------------------------------------------------- + | Parent Theme + |-------------------------------------------------------------------------- + | + | This is a parent theme for the theme specified in the active config + | option. It works like the WordPress style theme hierarchy, if the blade + | file is not found in the currently active theme, then it will look for it + | in the parent theme. + */ + 'parent' => "default", + + /* + |-------------------------------------------------------------------------- + | Base Path + |-------------------------------------------------------------------------- + | + | The base path where all the themes are located. + */ + 'base_path' => base_path('themes') +]; diff --git a/config/trustedproxy.php b/config/trustedproxy.php index 8cfd785e7..dc46c31ba 100644 --- a/config/trustedproxy.php +++ b/config/trustedproxy.php @@ -1,5 +1,7 @@ \Illuminate\Http\Request::HEADER_X_FORWARDED_ALL, -]; \ No newline at end of file + 'headers' => \Illuminate\Http\Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB, +]; diff --git a/database/factories/ApplicationApiFactory.php b/database/factories/ApplicationApiFactory.php index 13c666db3..c85149ae6 100644 --- a/database/factories/ApplicationApiFactory.php +++ b/database/factories/ApplicationApiFactory.php @@ -2,18 +2,10 @@ namespace Database\Factories; -use App\Models\ApplicationApi; use Illuminate\Database\Eloquent\Factories\Factory; class ApplicationApiFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = ApplicationApi::class; - /** * Define the model's default state. * @@ -22,7 +14,7 @@ class ApplicationApiFactory extends Factory public function definition() { return [ - 'memo' => $this->faker->word() + 'memo' => $this->faker->word(), ]; } } diff --git a/database/factories/DiscordUserFactory.php b/database/factories/DiscordUserFactory.php index e4a7345b9..760aaad7d 100644 --- a/database/factories/DiscordUserFactory.php +++ b/database/factories/DiscordUserFactory.php @@ -2,20 +2,12 @@ namespace Database\Factories; -use App\Models\DiscordUser; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; class DiscordUserFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = DiscordUser::class; - /** * Define the model's default state. * @@ -24,18 +16,18 @@ class DiscordUserFactory extends Factory public function definition() { return [ - 'id' => $this->faker->numberBetween(186902438396035072 , 986902438396035072), + 'id' => $this->faker->numberBetween(186902438396035072, 986902438396035072), 'user_id' => function () { return User::factory()->create()->id; }, - 'username' => $this->faker->userName, - 'avatar' => $this->faker->uuid, + 'username' => $this->faker->userName(), + 'avatar' => $this->faker->uuid(), 'discriminator' => $this->faker->randomNumber(4), - 'email' => $this->faker->safeEmail, - 'verified' => $this->faker->boolean, + 'email' => $this->faker->safeEmail(), + 'verified' => $this->faker->boolean(), 'public_flags' => $this->faker->randomNumber(1), 'locale' => Str::random(2), - 'mfa_enabled' => $this->faker->boolean, + 'mfa_enabled' => $this->faker->boolean(), 'premium_type' => $this->faker->randomNumber(1), ]; } diff --git a/database/factories/PaymentFactory.php b/database/factories/PaymentFactory.php index ad85e7258..5a6312a2a 100644 --- a/database/factories/PaymentFactory.php +++ b/database/factories/PaymentFactory.php @@ -2,20 +2,12 @@ namespace Database\Factories; -use App\Models\Payment; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; class PaymentFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Payment::class; - /** * Define the model's default state. * @@ -27,11 +19,11 @@ public function definition() 'payment_id' => Str::random(30), 'payer_id' => Str::random(30), 'user_id' => User::factory(), - 'type' => "Credits", - 'status' => "Completed", + 'type' => 'Credits', + 'status' => 'Completed', 'amount' => $this->faker->numberBetween(10, 10000), 'price' => $this->faker->numerify('##.##'), - 'currency_code' => ['EUR', 'USD'][rand(0,1)], + 'currency_code' => ['EUR', 'USD'][rand(0, 1)], 'payer' => '{}', ]; } diff --git a/database/factories/ProductFactory.php b/database/factories/ProductFactory.php index 323317cb3..abf3ae48d 100644 --- a/database/factories/ProductFactory.php +++ b/database/factories/ProductFactory.php @@ -2,18 +2,10 @@ namespace Database\Factories; -use App\Models\Product; use Illuminate\Database\Eloquent\Factories\Factory; class ProductFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Product::class; - /** * Define the model's default state. * @@ -22,12 +14,12 @@ class ProductFactory extends Factory public function definition() { return [ - 'name' => $this->faker->name, + 'name' => $this->faker->name(), 'description' => $this->faker->text(60), - 'price' => $this->faker->numberBetween(0 , 1000), - 'memory' => $this->faker->numberBetween(32 , 1024), - 'disk' => $this->faker->numberBetween(500 , 5000), - 'databases' => $this->faker->numberBetween(1 , 10) + 'price' => $this->faker->numberBetween(0, 1000), + 'memory' => $this->faker->numberBetween(32, 1024), + 'disk' => $this->faker->numberBetween(500, 5000), + 'databases' => $this->faker->numberBetween(1, 10), ]; } } diff --git a/database/factories/ServerFactory.php b/database/factories/ServerFactory.php index b15e981c4..96c8e586e 100644 --- a/database/factories/ServerFactory.php +++ b/database/factories/ServerFactory.php @@ -3,19 +3,11 @@ namespace Database\Factories; use App\Models\Product; -use App\Models\Server; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; class ServerFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = Server::class; - /** * Define the model's default state. * @@ -24,11 +16,11 @@ class ServerFactory extends Factory public function definition() { return [ - 'name' => $this->faker->name, + 'name' => $this->faker->name(), 'description' => $this->faker->text(60), 'identifier' => Str::random(30), - 'pterodactyl_id' => $this->faker->numberBetween(1000000,1000000000), - 'product_id' => Product::factory() + 'pterodactyl_id' => $this->faker->numberBetween(1000000, 1000000000), + 'product_id' => Product::factory(), ]; } } diff --git a/database/factories/UsefulLinkFactory.php b/database/factories/UsefulLinkFactory.php index 1bfde9674..5c7722c70 100644 --- a/database/factories/UsefulLinkFactory.php +++ b/database/factories/UsefulLinkFactory.php @@ -2,18 +2,10 @@ namespace Database\Factories; -use App\Models\UsefulLink; use Illuminate\Database\Eloquent\Factories\Factory; class UsefulLinkFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = UsefulLink::class; - /** * Define the model's default state. * @@ -24,8 +16,8 @@ public function definition() return [ 'icon' => 'fas fa-user', 'title' => $this->faker->text(30), - 'link' => $this->faker->url, - 'description' => $this->faker->text, + 'link' => $this->faker->url(), + 'description' => $this->faker->text(), ]; } } diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 822e4978a..b0ae6fc60 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -2,19 +2,11 @@ namespace Database\Factories; -use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Str; class UserFactory extends Factory { - /** - * The name of the factory's corresponding model. - * - * @var string - */ - protected $model = User::class; - /** * Define the model's default state. * @@ -23,14 +15,13 @@ class UserFactory extends Factory public function definition() { return [ - 'name' => $this->faker->name, - 'email' => $this->faker->unique()->safeEmail, + 'name' => $this->faker->name(), + 'email' => $this->faker->unique()->safeEmail(), 'credits' => $this->faker->numberBetween(0, 1500), 'last_seen' => $this->faker->dateTimeBetween(now(), '+30 days'), 'email_verified_at' => $this->faker->dateTimeBetween('-30 days', now()), 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password 'remember_token' => Str::random(10), - 'email_verified' => true, ]; } } diff --git a/database/factories/VoucherFactory.php b/database/factories/VoucherFactory.php index 9a381296c..02cbf6140 100644 --- a/database/factories/VoucherFactory.php +++ b/database/factories/VoucherFactory.php @@ -23,12 +23,11 @@ class VoucherFactory extends Factory public function definition() { return [ - 'memo' => $this->faker->word(), - 'code' => Str::random(36), - 'credits' => $this->faker->numberBetween(100, 1000), - 'uses' => $this->faker->numberBetween(1, 1000), - 'expires_at' => now()->addDays($this->faker->numberBetween(1, 90))->format('d-m-Y') + 'memo' => $this->faker->word(), + 'code' => Str::random(36), + 'credits' => $this->faker->numberBetween(100, 1000), + 'uses' => $this->faker->numberBetween(1, 1000), + 'expires_at' => now()->addDays($this->faker->numberBetween(1, 90))->format('d-m-Y'), ]; - } } diff --git a/database/migrations/2014_10_12_000000_create_users_table.php b/database/migrations/2014_10_12_000000_create_users_table.php index d37bbc762..c28f40d8e 100644 --- a/database/migrations/2014_10_12_000000_create_users_table.php +++ b/database/migrations/2014_10_12_000000_create_users_table.php @@ -4,9 +4,10 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateUsersTable extends Migration +return new class extends Migration { protected $defaultAvatar = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAgAElEQVR4Xu3dCbht5RgH8HUUGqRBqO6gwi1xhZIGlCYSUlGmkjGVaFJCSinNhWgwplCh2ayQoQxFGg0paUaDBlMcz+97+p9n3d05Z9179tn3nnP2Ws9znrP3XtO3vvf/zu/7rYHZs2cP/utf/6r++c9/Vv/973+rRzziEeVvcHCwfB8YGKjabfLOADoutNBChY7/+9//yp/viyyySPXoRz+6Gpg1a9bgf/7zn+rf//53IbqdAYCD223yzwB6BgBh6kc96lHVIx/5yGpg5syZg37MjoUXXrgFwOSn+RxPUAfAgw8+OMToRTJMmzZtEOf7i/iHFt9JgFYFTG40hK51moaufhuYPn36YB6x/PCQzo++AIp2m7wzgI5hbE8RZh+iORXQ+Xjhfr+3EmDyEj8E9z9qoPNpBmbMmDEYIj8MHQ+pgsk9Bf09+oj+4aQ8es+hAoZDTOsJTG4AdXp0nRL9YQCY3I/bjn5eZ6AFwLzO2BQ7vgXAFCPovD5OC4B5nbEpdnwLgClG0Hl9nBYA8zpjU+z4FgBTjKDz+jgtAOZ1xqbY8ZMeADJaIlr1IFb9u1qHRRddtJLlTH5D5tPm3GRBBUikSP3/xz/+Ua65xBJLlM+jbbnXZMXFpAdAklWdhMh3xEfov/zlL4XYyy23XKX+4d57762WXnrpavHFF69uu+22sg8A7FMoATB33313tdhii7UAmAzofliI86Gs5n333VeIueSSSxYJ8Pe//71UwwDFHXfcUT3wwAPVSiutVI65//77yz7FMYDw+Mc/vrrnnntaAExkAJSExkPEHu6//Spf7rrrrvJ/qaWWKtIAcbfZZptqlVVWqY466qjqN7/5TbXyyiuXY4DEeZEGrQqYwAhoAgARjssRVt0jm+BFL3pRteuuu1bPf/7zKxKCOvj0pz9dHX/88YX4j3vc4wqoSAXSoAXABAZAhjaSCkDQxz72sUWfz5o1q9p///2rl73sZeU0wKDvEdn/yy+/vEiDb3zjG0VFMAKVULUAmMAAaDICifGZM2dWr3nNa6o3vvGNhbtxPXsAMCJBIvIZgxdddFH1sY99rABhxowZLQAmMP0Lp47mBm677bbVDjvsUM2ePbs8BhXgnJRK+07U2+IJ+Pz73/++uuCCC6pDDjmkBcCCBADXjI7GsUSy74iGsxExNW9EuO1vf/tb0d+vfOUrq3e84x3Vc5/73CEut59IR2jnuYZrcQddy+d66RS74dprr61OOeWU6stf/nIxHnkT7hXVECBRJ67L7fTftXkUTXGCpv29nvsJHwcQiFlmmWUK4elzrhrChODx1xPweeYzn1m96U1vqrbYYosCGBtiIKxjnOvvpz/9aeHuv/71r9W+++5bjkfU2Ayuy2hERMS98MILq89//vPlPODxewAUW8EYAQQIeR3UTYJOIxGyBUADxE00X9xkm+j46Qw3RDXpJtHEb7XVVtXOO+9cLbvssoWQaXJxLqLjzt/97nfVkUceWZ155plDFbIISlLsueee1Ute8pIyIgQEAvfM+X4//fTTy/m//e1vi21hu/POO4ekgtgCF9PfrbfeWsY3kY3IBS4BmqqO66HciG/nIAoORdjNNtus2nvvvaunP/3p5XcEJSHqLiIQfeELX6g+8pGPFA5dccUVi2oBIoQGGMQGore+9a3lWjYSCHDqnx37qU99qjrssMOKRCKhjMMGdH4DUNdrJUADhzcBgB/PanccQsRvnz59evWsZz2r2mWXXap11123EBKRhXZ9RjjnIgAdfswxx1Q33HBDNW3atAIQx5Ia9qcM3meAI7oFidgQPgNeJM5jHvOYMhZqAbefcMIJ1ec+97kiMZ785CcXULqee99+++1lPK0EGGUGmhpPEMRWGhkHBgoAVlhhheotb3lLtdNOOxXuxckm2mdExIWIJrpHMhD7fnMNcX/cyvATG4g+d24kCw52PSJeXEC0EJfbACF9dgkd//CHP6xOPPHE6vvf/365XuyMuJwtALoAgMmMcYZo2223XfXud7+7EBAYEARxTDwuRLibbrqpcOVpp51WOJUedtxwngSOxrFA5D5J/uBkGwAKHG2//fbV8573vMrxjovrGDVjLF/96lerz3zmM8U+cM9kIFsAdAEAXMrwe/GLX1zttttu1XOe85xCTIQV148ljjB+/9KXvlTE/TXXXFNAQswHBKQNQvkfYxIxo7/9jw73e8Q9QFEdb3vb2woQfLY/QAAsQCBhbrnllurjH/94deqppxZbwDX6GgAmO3l4ojONCp3tZ6VVeWBgKD+PsIytF7zgBdUb3vCGEslDHMSMOI91jhDf/va3q6OPPrr6+c9/XvR2dHBTOrfBRClEfsITnlDUxY033lg94xnPqPbYY49iLCbDGJuDtABKG3UgdnD22WcPeSuZC/vr/fokReIJ7ue5ckyTimwaf9P+nnsBsYY9MIKGs3ALfe17dDZQZLGKNddcsxAdx+FWm0CMz8R8Jkmg5vDDD6/OOOOMQnTGIc4LMXB8N1vGLWz8xCc+sYxB7EBC6c1vfnP18pe/vEieAM39PBtAG4NoIon0s5/9bCjJZHxURAJZqUOIVwJYiUP0ujNrvgAAATxkCMlCR/h0rWYCAcIxuOvtb397sapNaKpzYoS5Fosedx100EFDq11kf66NCN1OYIiUNRSi8xNjYB9QTQxF0sn+ANRz+czj4IkwFMUGqCYA9jvgpBopQDA/MSa7Ae/cnNtzAJgoW8Sfh/PwHpy4NLEmwu+CMPvss0+J2zPC4kLFSEvyhqHFB//DH/5QOD6hXZwXNxA3EdvO6WZLriE99UDlWRDXGD2L8YkdvO997yvE9TxZgsW9SQzBKR4IwAom2e83YycZE9PwDO4FxAlzdzP+pnN7DoBwYdw5BEF8FvvNN99cJIPw7bve9a5qyy23LNxgQiMtTELWLuJuITxxaqITdzd5zouNELeQyHafbjbXRexEEmObGDdbI4RDXGDkdkpAJWcR/e4ZjMuzc09FEwHBmJWpmRdzRIo4x595aAokdfNsxc6oLxDR7cWGOz++e3xvyBY69Z1xtfvuu1eveMUrCjeYTBMXaz0+Oj9ewOUrX/lKIQYuNzkAgNtY2s4xef6bZPchAZqs8KZnNgZjcr0QB7F8T7jYMcbvN1FGgSlAYCfYZxwAmziDZ6fafvSjH1UHH3xwMS6Bg+53L/sQvm7rNI1zrPt7DoBYszjaQyU6xsCj51ddddXy8ESfY8JRCGmC+fMnn3xydeWVVxb3K7kB+02QyaQ+XDt+d7yDVAONdXKcFxsifn241H2TmwCMGHaOZyguv/zy1UYbbVQSTcLOyTY6FhAydjYB24DbGKC4r/vEU+hm/E3n9hwAMZZwvclhNEm6rLHGGmVsibXjbJ8TnmU0KdH61a9+VSYT4VOijdBZ2SwuYbjL/6gdYErApmkiRtrvev7ingFCQsyIntKx3DN5iEggYxdWFkNI/CBjQnAg8gzsGWqBlEuKOupwrGOfm/O6BsBwg8ykZXKgfK211iouXfxnho+JJMoRKqlbbtNHP/rR6ic/+UmZmCRiRnqYbq38uZmk0Y5pymWkBP3Zz352sXOoO9IOmJNSdkzUmudn5J577rllfurP31n4EunazTP0HAD0mbj9O9/5zqHyqvj7SeUiND0vkHPOOecUSZEoX5MRNNEBUI9heG51ByQgw5c6AATGZPIK5oJKBID3vve9c6zRNCkBQMzR4yx8D8kGYPVCN+IxmqRWHWMfY4mIrLuLoyF8ogMgnO55STrPKHdBGlILYh02mUXGJcBQAULKgkwkpa2zcCTfmyRQk3TouQSAZlG6DTfccMjAQ2AP/N3vfrf65Cc/WYIjuCF+v4d2jIly/mhbtxU13U5g0wQjfJpL4j1gCmoAI7zuda8rUuGpT31quZR5iI3ht0Q8m+4z1v09BwAXBwBe+tKXDoVLEf/AAw8s1n09YMIQJAJjG+CeJGpGesCJDgDc7Hl4LakVoPqoNhIRwTfddNPquOOOK8auOTAnJOPqq6/etRHbBIyeAwCHyY6RAImXC+PuuOOOlcDOk570pPLQCfawnlOcmUBP00N0s7/bZEsTAEkyRPZcnid2jzFnWV6fzzrrrOppT3vakGdEVahm5h0MZ+xFcjXdv2lueg4AXCwZwvqF7Oh3NsEVV1wxFNCJN4DjqQIgwAXxDpoeZKz7ew0AKkx9oGf32XPVu5D9hgkUnSbRZQ5EFgWU6p1JIXpdbU14ANB/jLxXvepVhQsMnijceOONq+uvv36odDqESPuWyaAziclebr0GQFrS0nOQeIVnSl7BsypSFUoGeEQH/he+8IVztKdPSAB0iqcgMpm+eAEMnUTrGHnq9kkALhAp4aEjElOnlzSxewgQiQwyioRd0xtQD/SMxU2K6knMwdh4FkLIidq5f6zzFJsaS7qHAdW4EtRKCXqsd+NCbGPlFrsXQruG65EIDGIRQ+e6lnkjATBAagWSkApojb1bI7ZrFdAtAEyMCUp1bsKfSbum5s+kqAUEFC4SfZq8eyTEWADgukBIUqWkDEGTm2e3pFyMakrQCgjFLjJ+0g1IADV2jPElYpkqpMQ1EsJOKrhvAZDFGBJuDcoR1WeTjgtwjHAyrhRVFC+47LLL5vCPxwIAQMK5rs1OkckDCEGYP/7xj0N9ASQOqeD/n/70pzIu1UHCu/H15QCErhGddHBssnyeBScnPZ74hTH3tQQwQdGL9QpgHINb6MJU+eAa5Vg8CJMunawnoBsJYPIRTq0ht1Ql8NVXX11qExApqWCAY7OIUGoyVaOomcRGShgP9cFqP+mkk6pvfetbJY4RNYLwyWWk8MPzxDboWwlAbKYAwmSSCNGz6a9Lo4UcAVvCpBLBMoSbb755VwAgATSCahPD9XT0XnvtVSKTVg5JQunPf/5z0dEaS+QzgBXBcXpqFhA4BSiMOi1qSW+TKsYNUCSJ68bG6WsJAAB0pi0p1+hQ3BG3UMpULCG2AX1Nb6+//vpdAcA9if9vfvObpRIJlwvTpuQ89QA4X8UP9xUhjRsAfvnLX1a//vWviw+/3nrrFY4OCH784x+XHAhVojglxaPxbqIW+hoA0ZHUQMCQ0m161m+XXHJJIXIKP4SORc0YYZtssklXAAAkUkQPge3YY4+t9ttvv2JjIDSjDgGlaiVxWOe2X/ziF0UVGAvuZiiuttpq5VxRT89DkpEsonykmfGnYynFK6RAXwMg7hbuII5T509/0sfCyJECVAFRLHDi2PFQAQiBaIpTeBziFQCHKMYGIGLysnNAQXQrSSMJgNM4U9xJkhgXNfH617++SAgif+utty5t5uH8NKo41v6+BgAxKCmCs5IHYEjhtve///1l0hINUz5GKhx66KFFnDqOBHCNWNWdUbLUCaYqOR1C8bdZ8VYCUZ5GDSjujM8PEIiLoPoEk77F4bp/SCGcn/qHlKipctIllKJPxqVuJsYiUNVtnhSwMAIB27hSTEKlJG4Q99j/KRUHMIm4OsYfLldKpSgiuXREs6jTZz/72bJ0i8840XkSKaMBIO5k3C8TSE/T6US7km7rBpEyjD+qIGKZuAYM9+UlMPw0oCCmfWkTy/oDniG1fVQJT8G1FLdoacs5iBrJZ7979y0ATABOS308t4/oP+KII4rRxyXTAZy8AYK95z3vKRMrIJTCy5EkQJIw6fyNmiG6AQjXr7322sX4QzBEBji6n34HMGVa8fVV9eDodA2n1q8exQQCksQzpLZRWZhqYBKNqmAUki59DwCE94cYJgfHXXfddaVQ4tWvfnUh0FVXXVUCLrKIiI9jTbKMWZMKwJ3pD0zzZ4is+whxqRX5CpztPq5tLO7nN4RMx7D7XXzxxUX8ZxFKnkk6eZwn3S1Y9Z3vfGdocQnA5VoCXlLE6SnoawkQTjDBaRSpu3p+15Ur6KO2QGqZa2USiXD6eDQVgPNFERE17VjUByJRM1w+HMlnZ9wlqENSAJgyNSVtyVaSSgCakrW4iVQLO4Y9w/ij/wGFBKAaqBHjFjfwPeXsqWDuWxWQUikTatIZVybJdyIepxHP6c8nWkUD6VAAYC802QAmHJBShpawrrp8ANTIyaVLG1cCUkDzxS9+sQDQeBBeuBh4UuSRtra0epFg6W/43ve+N7SMjHQvz4HqYNtI9/Iq0p3ctwBInz8LOz1zCEG8AgQi4D6umAWaROtY5Vmho8kGqJd1kwDAAgAIrssI4dTuWwAKyHBvAlLuLaKnhB3B2SGigOnwSbkWEZ6ilvQiGLtzrWJi/MDmXM/oWGNIxLOvVYCJimVu8ohR3JZFnUNABMdZH/zgB0t5NeOJtJALGE0C1N2nRIyyjgDpQbXgTGsA2NJngGhyBF/72tdK7YLv1hwgAYwjMQLcbF9Ku43F2D0Dj0K+wG84nCcAAHoFkzVMXUDfSoDU/yV3Xk8vh3jJh/MQSAANpCkl7zQC6dx6uZTvxD/dTO8iHq7k++M8zSeuSdWk9Sv/EdWCEww6dgSVwzdHvHQtBwiInNoG3E2NSQrpBwByncxsgCxFkyLYvlcBYwEAgiGsUHBnHKATAAERYiIE7tSPx5bwmwigoE2s/ywC6VjGoUWkRfIAx3ccjXhsB/9tVIJaBQBzP4CzX/QwZd84nMHpuukudq7Pfa0CxgsA9Tr5ugTwe4xAXIpQmk/EGqwmIv9PsmQVkDSW4nJuoICO9DOi4voNNtigGKckStYDSP4fQCLBSAzXTxEJl5DdQQXUy98QvwVAxytf6rVvCBgVkFU9qQCTKI07XBzA+c7LHz3tz/FCzOwInPihD32o+PhZiRSBU4CCUES+cLTj2Q2kh6ZWtkBUlusaH+7PK2YYkQDFDaQOHCN8bW0AwEkpV4pfWgDMJQBiA6Rlqg6AlFrFaAzxASUNqoh0/vnnF72Mo6kPsQU+u+/OAQwJIADgqkkOiRdkUSj5CK6h/YkBICCDkeHn/s4T+eP7R9czNLmbaYM3XvdqbYCHGkRHMgLrEmA4AMQGqAMg10oxpu/CujwGxMOR6vBl7Bh/CBivI6uGJnOnKIT+TtGodQqsTyjhg7vTxh2XFQgAU9SPzjcugLLYFQnjXsl41pehbb2AWv9bZ/nzcF6AY2QDxe/jBiaCWAdAzhXV04am2YKriYhsASI5PjwiImhqEf2OQ4WJ3Qc4xPNFDYExmTsGYhaQ8hvQWJbWK2iMU4xBoilxhnQFZxWQVgWMogLim5vIugTwOwAIBWeNoE4AIGTi9CYZ11sDWG5BEYj9adlC/KR/064GDAw7/jt3kTiP7WBlMq5eUsDOcS3xhAMOOKC4limDf+1rX1udd955xdMgiZxnSwdUXwOAHx0Cpo0qTSGqb5POZZ2bMG6b6hybghBBGhwoW5eiEscm/ZtVSRh/In6se8Rj3HkbSMrRhsqKOj4gDhCQFur0E/ThRn79618vIOJREPtEOwNVwipLxWt/0wCaWgcg5olk7aJUDlkXwHVSIMte6Yt6gIjDFH6EI02E9mhiE4ETYvWiJyFVhGV4SdYgQiJx9CzxG2Mr8X9LsCTtSzcT5cR/04shXTvEcF3WfRaalhbm68sNsAm4lMLGWVMIWEgaEodaYGjyZNL1zOOgZripfQsAhGeAsaoR1AQjokn8wQ9+UKpkEMkkpa06vjWwOM6WrBq1gFNxmes5B1HE5YECEVnyKUdvkgAASmTLQ+BkgaF0LqVvMcvAGQcweAaeAJdR7aD7GrPjSBSg9MzpM+hrACB8LHCiNmVWJkcGTU8AItUXZ8ZZ9HHKq9KKZXKpBQYbLkME54r8CcPaLDvL4nZuVvUcSfz7PW8PBQIqiZhW6CknkCggIMSecD+SQdpaniGvowFG40xdIXWWJti+BkAWQ0h0zKTQkwiewssUcsS6j/WNO9NTmAaLlHinpczkKirxyjjFnsK6pEUWnZwbCeAayRKmH0CJGNdOOXikkwAR1aIAlNTiElJfxuY+QJnGTwDMYld9DYAs146j84YNk5eIXAI60fOx9LNqV6xv3wHDcQy9LEerduADH/hAsc65gfzzuhhuWoSKBHCM+2YFk5SfCSIhchZ0SKjZWOh7qgBgEuyhrlzPOJ2X/sO+BoCJwBUpuUpghd7ku6er1uTWF1RIW1UaS10jFrpzk6gBKtxPN+sldA33TNNniDmSGsC1CkGoIpKDdAIwRCRFWPPGzKBk6RP77pmCFedlgQjSIOdFjaViqG+NQIRAPBOBw0xWauaynkAWgKyv2JmmUscmoIITs75AQsB1yZEVOvxGQqQgdTQbIF2/7AWfsyIoVWO8afi0j6j3PUZiGk95NBm7c9zf+WkXm9QSIImX+iQmHu+/wAcdzKdNUMfD86NZ+Ymf19O2aQlLanY0AiULONIxsS1G2t8kAUa799zsA0jPARjulZJzzwiEwAu4Ygp5i7nfqQoxjqwSNjf3GssxXa8P0AQADyB+zqePOKf7fFeEGXGahE0IZrJwVQI6Iz3cRAdAun8CtOQP/A78XENhZOliaiNShcoS82iKU4yF6HMwa7eLRTcBAMKlQYVD4yoBAAufxeyBs5BC6v/8lsKKNIdMVgAkkhn1kJBzVhRBfGlnNoAydRID8BFeqpvN0cut5xLAA2jrloRJxk4kzds2xMdjJAFKpEFW5ACMpq1JAiSxNFYANd2/aX/8/bi7eTcCIDAihZAVtkoYCU3Hy2ELPeUpT2mUgE33b9rfcwAgpuibVCxkJ3LnVe1y8zpnY5zhivpaeo71vRsbYEEDIG4mjk5IO4UjxLywtqXldRbzhBxPUgpiqT6qrxLWRMyx7O85ALhJXp4ka4cbSIS87AHaiT/VMkBCCmTdQMCZGyu9SQKMZVLG8xzPQM+TAMR93itsBRItbww9W95ZnG4hgAEA5/Zy6zkAIFgmjshHeFteBcfgS2UMjwAQ1M8LoOASHkRToGaiAwBBxQgAWuBI5FBZu4qhJMCoBZ9Tu0jyWXSC1Gx6/m7B0XMAeHAPwerX6wfVKdWOLx9Xia9tPQAZProxeYBuVEC3E9Tt+dHzQK3FXJuZfAfgp7GkvkyOQJJopfoDxnDspm7HMdL5XQOgaWCx8IkygQ/VNKpsZesi7hIk8bCOl3T5xCc+UerqqQ3Bl8T93S8hX9zfWQuYGETG1a2fTy1lUae8ICJL3jLUiHiSjchOx5DxZZ/fZBFJQEvEZ6lYxxh/7CLXlmlUfaTqGHAcE5A0zfNY9/ccAEmKpHnSA2nz4hWYlJRhZb29LKGCcDqGZd4UUzKKZORMmslyPLD4n7BvYvZ55479TUZg08QZr7+sGOL+eZl11gegv1MaDhxUF2BYRo76U4SK621ZdMp+n41ZrQLia4W3JT+Sl2E3jbGb/T0HQMKhJi4191KjxBvLV1k2zkixpP+2FFACgi4e6w1feumlpawqlbs4hCVNVbi2CGO4MNZ0tyI0/YQIbCwpMWfbJG4RYBoLogK4ohN9AGlq9UzGZ5yRZhpbVCbxiOxL6jggcWyvl8rtOQA8eOLxWUnTA7KGM6mCRMq1dNEAhwcHkOQCwi04RWMoyYDoKctGiHT+hPC5djfc4VwSJNk84ARMHM9IpcYQiNTi7VBxysiVrXmRpM3+1P8nwMUY5PV4bRx1FzUSglN7TRHQbp8r5/ccADgla+kSaanbA4aI/3gF7AP1dERgXvkWfYqgqdVX4OGlUlmDz/EBSfIIJA7CJO4w1gnLCiPOT+IpQZ30BwIg41baWdmZDcCpoHrVj7lQmKqm0YqinodEC4iSCU2lEanQ7Wvvmp675wAIkhHQ51TBZFHmcCxOM0HEp9U01NfZEkL1OSFSk6JEi7fAfQwQ6hm52AfdBlJcO4WaqfJN8SqQcutUAPNwbKx4Mf68BCrSg3vLnlGNJOLJJkh6OXrfmIEWeHPfrJ7aRMix7u85AMKFJjEWdVbqSmrUJCVTlgUgvV6OfjTBWVnTceEO1wAojR46cCzKSCQLtqgjwJ28h26TKe7heqQYtcNCZ5CyX/IyrCz1VjfsIrmIeNFOreIIKyaA8FldzPNkXcTYQSll79aDmRtQ9BwABpF35eB6QEhqNBZ6OCueQDifdc9lBIZ11lmnPE/EIg7JIguqfUwwt9GEi6lTMazxuGxzMxnDHYOQAEhMM/IATFmZ2kJt5vUt3IqTNZYqJZcHCVfXVz2LKkyRiDkBjKw4kpK2GMVjHX/TefMFAKMNoilfHxtCG5dAioBKCi5wiP0p1WJNM64s6sDeiJhNWDleSIzL+OAmP7WBKUvHhUS1fQzThGbF7bM8bcK3sQ+y4odgluXs6HlSaLRtQUcyJzwAEA8XIIyuHoUkLO2syoWr6nYCwiuu4DFYny+Wd2IEeQFDJENeS4MQwOR6WfIFwEghhhq7RNzCcdRUwGF/spaKTgWw3N8WL6EFwCgz0CQBsnATIiMQ4ij71ttHLSBGLOW6xU78Kzj58Ic/XApC86IHqiPXQjz9e6KUgIGoiInj3Yu4J+qpIbo72brkMKgwnyW0qB/SB2C5gylTa4rk9b0EaIrUEb0IEV8f5yIoguDIqIXYB/4n+MJeIBGsNG49wFT4pjIJ8ZKpi9VOz9ukafUSiOIlZA1g9DzDDYEBxXsBJLGsVySTGfVC4rhW1NNIPNACYGBgVB1pQpNHT3IEaACDdW7SdfpQDcmmxcBKcYUbiCKKs/PDERGX2g8kRDxJgqDazbl1av5tLPQUdcSI85taBmpGlFKzSELSAXTcvyaA9z0AmqxU3Mf9oqsRnBGY6t/U/yMci5yBljeIpOsnXMs3twGAZV9SIg5A2slIFHF7QEJMkoO6SDo2fQiikNw64t5vopckEqngj5uI6HllTIzLVgI0UXqE/YhBTNPzJpgYN8EIg8hZ0DkulKXfSASLOcXFSgbOuaQI8S0MK6LIXUN4NkXWCsgqYe5J9aSMW8xBy5d74nog4QmwI9gH4h6Dl00AAALgSURBVAPUj/OM2fjquYDhHrGVAA3AiMGF6xE+L1oAjMQBEkfwP/X2wsqIigAIGH86nUYIy1B0DXF710dQ4IjeToAKWEgNRaxUR7051XmuAWxJFAGDc927KZnTAmCMkmG406Jv63r3qKOOKquOBwh5V49jEniKJ5JmERID9/LjJamI+CwCFfWTGEK32cZxfPwxXWqBxwHGNOoRThoOAHQyi179neaUepYtLeUIj5BxJzV5cuv8adZAfG4hteP8LCMzN40r4/l8vbjWlAdAxDhwCCnjaETNGgRZWMLkSuQozBDJY3AieDicakgIO4Zd+hN7QZj5dc0pDwA6NoRjH/Ai2AYqkuhzwMDh3gSC40UPGZt5FxBiJ7OYpWwQJyVd84tQvbrPlAdA3vSB09OTz/JfffXVS/4esaWVBXTk57NgBWJLYsUjSP0eQmSxCuBoimT2inDjdd0pD4C4jiaMJEhpGmNQ5hAoiPqkpgMYv0XUp08RKBA8Yd4WAOMFw3G6znBGYN7uGVdNKDlGn7QxNy3VvkQ9Iqdkm6sooBPRj/jpYjbk4foix+lR5ttlprwEQCTER0QuXN7Zl1Ct7wCAqxl1AQeJ4HggCOfHbUyVURJL841aPbjRlAJAD+Znyl+yBcCUJ/HoD9gCoAXA9ME+n4O+fvxWAvQ1+auqBUALgFYF9DMGWgnQz9QXzOpcJSwFCp1Rrz6fp0n7+Elapcuos0ZxYMaMGYP5MdUyedqpEOqctJQbp4F30rC+gEYpmp05c+bD3EA7RkLMOI2rvcx8moFOid552zlUQB0dAJCFHefTWNvb9GAGQsOkrR8m5adNmzaYHx0U3R8p0FTX3oMxt5ccxxlAx06aZsGKwvBUQFKgaeHuNBzGcTztpRbADNQNelnQVEmpjxiYNWvWYGrqs6MFwAKgUg9vWQcAZsfoUtnS2wOzZ88eTLFE8t4BQA7u4djaS/d4BsLUKWTJQhx5N+L/AfjNYarLl7XXAAAAAElFTkSuQmCC'; + /** * Run the migrations. * @@ -39,4 +40,4 @@ public function down() { Schema::dropIfExists('users'); } -} +}; diff --git a/database/migrations/2014_10_12_100000_create_password_resets_table.php b/database/migrations/2014_10_12_100000_create_password_resets_table.php index 0ee0a36a4..fcacb80b3 100644 --- a/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreatePasswordResetsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() { Schema::dropIfExists('password_resets'); } -} +}; diff --git a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index 6aa6d743e..17191986b 100644 --- a/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateFailedJobsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ public function down() { Schema::dropIfExists('failed_jobs'); } -} +}; diff --git a/database/migrations/2021_02_06_182407_create_notifications_table.php b/database/migrations/2021_02_06_182407_create_notifications_table.php index 9797596dc..4357c9efa 100644 --- a/database/migrations/2021_02_06_182407_create_notifications_table.php +++ b/database/migrations/2021_02_06_182407_create_notifications_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateNotificationsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -32,4 +32,4 @@ public function down() { Schema::dropIfExists('notifications'); } -} +}; diff --git a/database/migrations/2021_02_07_173938_create_locations_table.php b/database/migrations/2021_02_07_173938_create_locations_table.php index 921f766ae..cbb839090 100644 --- a/database/migrations/2021_02_07_173938_create_locations_table.php +++ b/database/migrations/2021_02_07_173938_create_locations_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateLocationsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -30,4 +30,4 @@ public function down() { Schema::dropIfExists('locations'); } -} +}; diff --git a/database/migrations/2021_02_07_173939_create_nodes_table.php b/database/migrations/2021_02_07_173939_create_nodes_table.php index e24a2b5dc..839afb3ea 100644 --- a/database/migrations/2021_02_07_173939_create_nodes_table.php +++ b/database/migrations/2021_02_07_173939_create_nodes_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateNodesTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() { Schema::dropIfExists('nodes'); } -} +}; diff --git a/database/migrations/2021_02_07_173940_create_nests_table.php b/database/migrations/2021_02_07_173940_create_nests_table.php index d9ced4173..fe06c8da6 100644 --- a/database/migrations/2021_02_07_173940_create_nests_table.php +++ b/database/migrations/2021_02_07_173940_create_nests_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateNestsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -30,4 +30,4 @@ public function down() { Schema::dropIfExists('nests'); } -} +}; diff --git a/database/migrations/2021_02_07_173941_create_eggs_table.php b/database/migrations/2021_02_07_173941_create_eggs_table.php index 57aba4e30..20ad4243d 100644 --- a/database/migrations/2021_02_07_173941_create_eggs_table.php +++ b/database/migrations/2021_02_07_173941_create_eggs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateEggsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -34,4 +34,4 @@ public function down() { Schema::dropIfExists('eggs'); } -} +}; diff --git a/database/migrations/2021_02_07_173942_create_products_table.php b/database/migrations/2021_02_07_173942_create_products_table.php index 1cb9ef677..7cbacb49c 100644 --- a/database/migrations/2021_02_07_173942_create_products_table.php +++ b/database/migrations/2021_02_07_173942_create_products_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateProductsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -39,4 +39,4 @@ public function down() { Schema::dropIfExists('products'); } -} +}; diff --git a/database/migrations/2021_02_07_173943_create_servers_table.php b/database/migrations/2021_02_07_173943_create_servers_table.php index 6a90c693d..e5f03205c 100644 --- a/database/migrations/2021_02_07_173943_create_servers_table.php +++ b/database/migrations/2021_02_07_173943_create_servers_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateServersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -37,4 +37,4 @@ public function down() { Schema::dropIfExists('servers'); } -} +}; diff --git a/database/migrations/2021_02_08_190205_create_activity_log_table.php b/database/migrations/2021_02_08_190205_create_activity_log_table.php index cb4f3cc5c..69a504e1e 100644 --- a/database/migrations/2021_02_08_190205_create_activity_log_table.php +++ b/database/migrations/2021_02_08_190205_create_activity_log_table.php @@ -1,10 +1,10 @@ dropIfExists(config('activitylog.table_name')); } -} +}; diff --git a/database/migrations/2021_02_16_162655_create_payments_table.php b/database/migrations/2021_02_16_162655_create_payments_table.php index 7c7d6f073..39710646c 100644 --- a/database/migrations/2021_02_16_162655_create_payments_table.php +++ b/database/migrations/2021_02_16_162655_create_payments_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreatePaymentsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -17,12 +17,12 @@ public function up() $table->uuid('id'); $table->foreignId('user_id')->references('id')->on('users'); $table->string('payment_id')->nullable(); - $table->string('payer_id')->nullable();; - $table->string('type')->nullable();; - $table->string('status')->nullable();; - $table->string('amount')->nullable();; - $table->string('price')->nullable();; - $table->text('payer')->nullable();; + $table->string('payer_id')->nullable(); + $table->string('type')->nullable(); + $table->string('status')->nullable(); + $table->string('amount')->nullable(); + $table->string('price')->nullable(); + $table->text('payer')->nullable(); $table->timestamps(); }); } @@ -36,4 +36,4 @@ public function down() { Schema::dropIfExists('payments'); } -} +}; diff --git a/database/migrations/2021_03_24_073828_add_ip_and_last_seen_to_users_table.php b/database/migrations/2021_03_24_073828_add_ip_and_last_seen_to_users_table.php index 88f16ddd6..30efcff8a 100644 --- a/database/migrations/2021_03_24_073828_add_ip_and_last_seen_to_users_table.php +++ b/database/migrations/2021_03_24_073828_add_ip_and_last_seen_to_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddIpAndLastSeenToUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() $table->dropColumn('last_seen'); }); } -} +}; diff --git a/database/migrations/2021_04_11_190944_create_discord_users_table.php b/database/migrations/2021_04_11_190944_create_discord_users_table.php index 6d556704e..dcbccc704 100644 --- a/database/migrations/2021_04_11_190944_create_discord_users_table.php +++ b/database/migrations/2021_04_11_190944_create_discord_users_table.php @@ -3,9 +3,8 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -use Illuminate\Support\Str; -class CreateDiscordUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -40,4 +39,4 @@ public function down() { Schema::dropIfExists('discord_users'); } -} +}; diff --git a/database/migrations/2021_04_11_195141_add_discord_verified_at_to_users_table.php b/database/migrations/2021_04_11_195141_add_discord_verified_at_to_users_table.php index fc5520650..406e708f1 100644 --- a/database/migrations/2021_04_11_195141_add_discord_verified_at_to_users_table.php +++ b/database/migrations/2021_04_11_195141_add_discord_verified_at_to_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddDiscordVerifiedAtToUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->removeColumn('discord_verified_at'); }); } -} +}; diff --git a/database/migrations/2021_05_04_155305_add_disabled_to_products_table.php b/database/migrations/2021_05_04_155305_add_disabled_to_products_table.php index 8889e0bfc..d10d893f2 100644 --- a/database/migrations/2021_05_04_155305_add_disabled_to_products_table.php +++ b/database/migrations/2021_05_04_155305_add_disabled_to_products_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddDisabledToProductsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->dropColumn('disabled'); }); } -} +}; diff --git a/database/migrations/2021_05_06_123125_update_make_description_nullable_to_locations_table.php b/database/migrations/2021_05_06_123125_update_make_description_nullable_to_locations_table.php index 141c1756b..f5d5a7508 100644 --- a/database/migrations/2021_05_06_123125_update_make_description_nullable_to_locations_table.php +++ b/database/migrations/2021_05_06_123125_update_make_description_nullable_to_locations_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdateMakeDescriptionNullableToLocationsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->string('description')->nullable(false)->change(); }); } -} +}; diff --git a/database/migrations/2021_05_06_131634_update_make_description_nullable_add_disabled_to_nodes_table.php b/database/migrations/2021_05_06_131634_update_make_description_nullable_add_disabled_to_nodes_table.php index 152c39acf..a56167804 100644 --- a/database/migrations/2021_05_06_131634_update_make_description_nullable_add_disabled_to_nodes_table.php +++ b/database/migrations/2021_05_06_131634_update_make_description_nullable_add_disabled_to_nodes_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdateMakeDescriptionNullableAddDisabledToNodesTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() $table->dropColumn('disabled'); }); } -} +}; diff --git a/database/migrations/2021_05_06_140859_update_make_description_nullable_add_disabled_to_nest_table.php b/database/migrations/2021_05_06_140859_update_make_description_nullable_add_disabled_to_nest_table.php index 5bbc48d61..02111c504 100644 --- a/database/migrations/2021_05_06_140859_update_make_description_nullable_add_disabled_to_nest_table.php +++ b/database/migrations/2021_05_06_140859_update_make_description_nullable_add_disabled_to_nest_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdateMakeDescriptionNullableAddDisabledToNestTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() $table->dropColumn('disabled'); }); } -} +}; diff --git a/database/migrations/2021_05_06_150709_update_make_description_nullable_to_eggs_table.php b/database/migrations/2021_05_06_150709_update_make_description_nullable_to_eggs_table.php index 23958ae94..5c42ff099 100644 --- a/database/migrations/2021_05_06_150709_update_make_description_nullable_to_eggs_table.php +++ b/database/migrations/2021_05_06_150709_update_make_description_nullable_to_eggs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdateMakeDescriptionNullableToEggsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->text('description')->nullable(false)->change(); }); } -} +}; diff --git a/database/migrations/2021_05_07_065911_update_to_servers_table.php b/database/migrations/2021_05_07_065911_update_to_servers_table.php index 862b81f5a..90e6c050d 100644 --- a/database/migrations/2021_05_07_065911_update_to_servers_table.php +++ b/database/migrations/2021_05_07_065911_update_to_servers_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdateToServersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -35,4 +35,4 @@ public function down() $table->dropColumn('config'); }); } -} +}; diff --git a/database/migrations/2021_05_07_162701_remove_config_from_servers_table.php b/database/migrations/2021_05_07_162701_remove_config_from_servers_table.php index 1fb904fa2..e519f45d1 100644 --- a/database/migrations/2021_05_07_162701_remove_config_from_servers_table.php +++ b/database/migrations/2021_05_07_162701_remove_config_from_servers_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class RemoveConfigFromServersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->string('config')->nullable(); }); } -} +}; diff --git a/database/migrations/2021_05_08_081218_create_paypal_products_table.php b/database/migrations/2021_05_08_081218_create_paypal_products_table.php index 207e4313b..2fd8f2f41 100644 --- a/database/migrations/2021_05_08_081218_create_paypal_products_table.php +++ b/database/migrations/2021_05_08_081218_create_paypal_products_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreatePaypalProductsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -34,4 +34,4 @@ public function down() { Schema::dropIfExists('paypal_products'); } -} +}; diff --git a/database/migrations/2021_05_08_164658_create_configurations_table.php b/database/migrations/2021_05_08_164658_create_configurations_table.php index ca5cb6f01..0c0f03ec8 100644 --- a/database/migrations/2021_05_08_164658_create_configurations_table.php +++ b/database/migrations/2021_05_08_164658_create_configurations_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateConfigurationsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -21,6 +21,7 @@ public function up() $table->timestamps(); }); } + /** * Reverse the migrations. * @@ -30,4 +31,4 @@ public function down() { Schema::dropIfExists('configurations'); } -} +}; diff --git a/database/migrations/2021_05_09_153742_add_display_to_paypal_products_table.php b/database/migrations/2021_05_09_153742_add_display_to_paypal_products_table.php index 26d614922..ff78e519d 100644 --- a/database/migrations/2021_05_09_153742_add_display_to_paypal_products_table.php +++ b/database/migrations/2021_05_09_153742_add_display_to_paypal_products_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddDisplayToPayPalProductsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->dropColumn('display'); }); } -} +}; diff --git a/database/migrations/2021_05_15_211643_create_jobs_table.php b/database/migrations/2021_05_15_211643_create_jobs_table.php index 1be9e8a80..a786a8910 100644 --- a/database/migrations/2021_05_15_211643_create_jobs_table.php +++ b/database/migrations/2021_05_15_211643_create_jobs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateJobsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ public function down() { Schema::dropIfExists('jobs'); } -} +}; diff --git a/database/migrations/2021_06_06_144120_create_application_apis_table.php b/database/migrations/2021_06_06_144120_create_application_apis_table.php index f429fecc2..470a36b1c 100644 --- a/database/migrations/2021_06_06_144120_create_application_apis_table.php +++ b/database/migrations/2021_06_06_144120_create_application_apis_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateApplicationApisTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -30,4 +30,4 @@ public function down() { Schema::dropIfExists('application_apis'); } -} +}; diff --git a/database/migrations/2021_06_09_213306_create_useful_links_table.php b/database/migrations/2021_06_09_213306_create_useful_links_table.php index c6fc73373..64ed052ab 100644 --- a/database/migrations/2021_06_09_213306_create_useful_links_table.php +++ b/database/migrations/2021_06_09_213306_create_useful_links_table.php @@ -2,10 +2,9 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; -class CreateUsefulLinksTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +32,4 @@ public function down() { Schema::dropIfExists('useful_links'); } -} +}; diff --git a/database/migrations/2021_06_23_090026_update_price_to_payments_table.php b/database/migrations/2021_06_23_090026_update_price_to_payments_table.php index a3bb56afe..6686007ab 100644 --- a/database/migrations/2021_06_23_090026_update_price_to_payments_table.php +++ b/database/migrations/2021_06_23_090026_update_price_to_payments_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdatePriceToPaymentsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -26,7 +26,7 @@ public function up() public function down() { Schema::table('payments', function (Blueprint $table) { - $table->string('price')->change()->nullable();; + $table->string('price')->change()->nullable(); }); } -} +}; diff --git a/database/migrations/2021_06_23_090806_add__currency_code_to_payments_table.php b/database/migrations/2021_06_23_090806_add__currency_code_to_payments_table.php index 3e6710bb9..4e3cbd81d 100644 --- a/database/migrations/2021_06_23_090806_add__currency_code_to_payments_table.php +++ b/database/migrations/2021_06_23_090806_add__currency_code_to_payments_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddCurrencyCodeToPaymentsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -14,7 +14,7 @@ class AddCurrencyCodeToPaymentsTable extends Migration public function up() { Schema::table('payments', function (Blueprint $table) { - $table->string('currency_code' , 3)->default('USD')->after('price'); + $table->string('currency_code', 3)->default('USD')->after('price'); }); } @@ -29,4 +29,4 @@ public function down() $table->dropColumn('currency_code'); }); } -} +}; diff --git a/database/migrations/2021_07_06_152319_create_egg_product_table.php b/database/migrations/2021_07_06_152319_create_egg_product_table.php index 4271f80b7..0ebd0dc05 100644 --- a/database/migrations/2021_07_06_152319_create_egg_product_table.php +++ b/database/migrations/2021_07_06_152319_create_egg_product_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateEggProductTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() { Schema::dropIfExists('egg_product'); } -} +}; diff --git a/database/migrations/2021_07_06_154314_create_node_product_table.php b/database/migrations/2021_07_06_154314_create_node_product_table.php index 0bb798c67..b0d2c57c3 100644 --- a/database/migrations/2021_07_06_154314_create_node_product_table.php +++ b/database/migrations/2021_07_06_154314_create_node_product_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateNodeProductTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() { Schema::dropIfExists('node_product'); } -} +}; diff --git a/database/migrations/2021_07_06_154658_add_disabled_to_eggs_table.php b/database/migrations/2021_07_06_154658_add_disabled_to_eggs_table.php index 353cf99b1..bbc9ff158 100644 --- a/database/migrations/2021_07_06_154658_add_disabled_to_eggs_table.php +++ b/database/migrations/2021_07_06_154658_add_disabled_to_eggs_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddDisabledToEggsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->dropColumn('disabled'); }); } -} +}; diff --git a/database/migrations/2021_07_09_190453_create_vouchers_table.php b/database/migrations/2021_07_09_190453_create_vouchers_table.php index 30a58d92b..481674b38 100644 --- a/database/migrations/2021_07_09_190453_create_vouchers_table.php +++ b/database/migrations/2021_07_09_190453_create_vouchers_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateVouchersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -33,4 +33,4 @@ public function down() { Schema::dropIfExists('vouchers'); } -} +}; diff --git a/database/migrations/2021_07_09_191913_create_user_voucher_table.php b/database/migrations/2021_07_09_191913_create_user_voucher_table.php index b75f7d262..bebf1bb1c 100644 --- a/database/migrations/2021_07_09_191913_create_user_voucher_table.php +++ b/database/migrations/2021_07_09_191913_create_user_voucher_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateUserVoucherTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() { Schema::dropIfExists('user_voucher'); } -} +}; diff --git a/database/migrations/2021_07_10_062140_update_credits_to_users_table.php b/database/migrations/2021_07_10_062140_update_credits_to_users_table.php index bce7b3441..ef4e069d7 100644 --- a/database/migrations/2021_07_10_062140_update_credits_to_users_table.php +++ b/database/migrations/2021_07_10_062140_update_credits_to_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdateCreditsToUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->unsignedFloat('credits')->change(); }); } -} +}; diff --git a/database/migrations/2021_09_26_150114_add_suspended_to_users_table.php b/database/migrations/2021_09_26_150114_add_suspended_to_users_table.php index f3b83a556..9f95c4864 100644 --- a/database/migrations/2021_09_26_150114_add_suspended_to_users_table.php +++ b/database/migrations/2021_09_26_150114_add_suspended_to_users_table.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddSuspendedToUsersTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->dropColumn('suspended'); }); } -} +}; diff --git a/database/migrations/2021_10_01_200844_add_product_minimum_credits.php b/database/migrations/2021_10_01_200844_add_product_minimum_credits.php index 162b52e8d..8fcd83ff9 100644 --- a/database/migrations/2021_10_01_200844_add_product_minimum_credits.php +++ b/database/migrations/2021_10_01_200844_add_product_minimum_credits.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddProductMinimumCredits extends Migration +return new class extends Migration { /** * Run the migrations. @@ -29,4 +29,4 @@ public function down() $table->dropColumn('minimum_credits'); }); } -} +}; diff --git a/database/migrations/2021_11_05_071456_add_tax_to_paymentlogs.php b/database/migrations/2021_11_05_071456_add_tax_to_paymentlogs.php index 3796ee9ed..3ce272bf2 100644 --- a/database/migrations/2021_11_05_071456_add_tax_to_paymentlogs.php +++ b/database/migrations/2021_11_05_071456_add_tax_to_paymentlogs.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class AddTaxToPaymentlogs extends Migration +return new class extends Migration { /** * Run the migrations. @@ -14,9 +14,9 @@ class AddTaxToPaymentlogs extends Migration public function up() { Schema::table('payments', function (Blueprint $table) { - $table->decimal('tax_value',8,2)->after('price')->nullable(); + $table->decimal('tax_value', 8, 2)->after('price')->nullable(); $table->integer('tax_percent')->after('tax_value')->nullable(); - $table->decimal('total_price',8,2)->after('tax_percent')->nullable(); + $table->decimal('total_price', 8, 2)->after('tax_percent')->nullable(); }); } @@ -33,4 +33,4 @@ public function down() $table->dropColumn('total_price'); }); } -} +}; diff --git a/database/migrations/2021_11_27_014226_create_invoices.php b/database/migrations/2021_11_27_014226_create_invoices.php index f2716c05b..eeb365e0c 100644 --- a/database/migrations/2021_11_27_014226_create_invoices.php +++ b/database/migrations/2021_11_27_014226_create_invoices.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class CreateInvoices extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() { Schema::dropIfExists('invoices'); } -} +}; diff --git a/database/migrations/2021_12_15_120346_update_to_payments_table.php b/database/migrations/2021_12_15_120346_update_to_payments_table.php index 50900f298..cfca690db 100644 --- a/database/migrations/2021_12_15_120346_update_to_payments_table.php +++ b/database/migrations/2021_12_15_120346_update_to_payments_table.php @@ -2,11 +2,10 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; -use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Schema; - -class UpdateToPaymentsTable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -39,4 +38,4 @@ public function down() $table->dropColumn('credit_product_id'); }); } -} +}; diff --git a/database/migrations/2021_12_28_203515_rename_paypal_products_table.php b/database/migrations/2021_12_28_203515_rename_paypal_products_table.php index b3b64dca5..460983b63 100644 --- a/database/migrations/2021_12_28_203515_rename_paypal_products_table.php +++ b/database/migrations/2021_12_28_203515_rename_paypal_products_table.php @@ -1,10 +1,9 @@ where('key', 'SETTINGS::SERVER:CREDITS_DISPLAY_NAME')->update(['key' => 'SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME']); DB::table('configurations')->where('key', 'SETTINGS::PAYMENTS:SALES_TAX')->update(['key' => 'SALES_TAX']); } -} +}; diff --git a/database/migrations/2022_01_14_234418_update_settings_table_allow_nullable.php b/database/migrations/2022_01_14_234418_update_settings_table_allow_nullable.php index 20d5a0c98..c30da2741 100644 --- a/database/migrations/2022_01_14_234418_update_settings_table_allow_nullable.php +++ b/database/migrations/2022_01_14_234418_update_settings_table_allow_nullable.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class UpdateSettingsTableAllowNullable extends Migration +return new class extends Migration { /** * Run the migrations. @@ -31,4 +31,4 @@ public function down() $table->string('value')->nullable(false)->change(); }); } -} +}; diff --git a/database/migrations/2022_05_30_085900_rename_credits_product.php b/database/migrations/2022_05_30_085900_rename_credits_product.php index af4759b21..deaadcc9b 100644 --- a/database/migrations/2022_05_30_085900_rename_credits_product.php +++ b/database/migrations/2022_05_30_085900_rename_credits_product.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class RenameCreditsProduct extends Migration +return new class extends Migration { /** * Run the migrations. @@ -14,7 +14,7 @@ class RenameCreditsProduct extends Migration public function up() { Schema::rename('credit_products', 'shop_products'); - Schema::table('payments', function(Blueprint $table) { + Schema::table('payments', function (Blueprint $table) { $table->renameColumn('credit_product_id', 'shop_item_product_id'); }); } @@ -28,8 +28,8 @@ public function down() { Schema::rename('shop_products', 'credit_products'); - Schema::table('payments', function(Blueprint $table) { + Schema::table('payments', function (Blueprint $table) { $table->renameColumn('shop_item_product_id', 'credit_product_id'); }); } -} +}; diff --git a/database/migrations/2022_06_02_081655_referral_code.php b/database/migrations/2022_06_02_081655_referral_code.php index 15cca0b7f..8c86d2ec7 100644 --- a/database/migrations/2022_06_02_081655_referral_code.php +++ b/database/migrations/2022_06_02_081655_referral_code.php @@ -7,20 +7,20 @@ use Illuminate\Support\Facades\Schema; use Illuminate\Support\Str; -class ReferralCode extends Migration +return new class extends Migration { - - public function generateCode($userid){ - - $random = STR::random(8); - if (User::where('referral_code', '=', $random)->doesntExist()) { - DB::table("users") - ->where("id", "=", $userid) + public function generateCode($userid) + { + $random = STR::random(8); + if (User::where('referral_code', '=', $random)->doesntExist()) { + DB::table('users') + ->where('id', '=', $userid) ->update(['referral_code' => $random]); - }else{ - $this->generateCode($userid); - } + } else { + $this->generateCode($userid); + } } + /** * Run the migrations. * @@ -32,14 +32,12 @@ public function up() $table->string('referral_code')->lenght(8)->nullable(); }); - $existing_user = User::where('referral_code', '')->orWhere('referral_code', NULL)->get(); + $existing_user = User::where('referral_code', '')->orWhere('referral_code', null)->get(); foreach ($existing_user as $user) { $this->generateCode($user->id); - } } - - + } /** * Reverse the migrations. @@ -52,5 +50,4 @@ public function down() $table->dropColumn('referral_code'); }); } - -} +}; diff --git a/database/migrations/2022_06_02_091921_table-user-referrals.php b/database/migrations/2022_06_02_091921_table-user-referrals.php index a6fdbd836..8f377d091 100644 --- a/database/migrations/2022_06_02_091921_table-user-referrals.php +++ b/database/migrations/2022_06_02_091921_table-user-referrals.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class TableUserReferrals extends Migration +return new class extends Migration { /** * Run the migrations. @@ -16,11 +16,10 @@ public function up() Schema::create('user_referrals', function (Blueprint $table) { $table->unsignedBigInteger('referral_id'); $table->unsignedBigInteger('registered_user_id'); - $table->foreign('referral_id')->references('id')->on('users')->onDelete('cascade');; - $table->foreign('registered_user_id')->references('id')->on('users')->onDelete('cascade');; + $table->foreign('referral_id')->references('id')->on('users')->onDelete('cascade'); + $table->foreign('registered_user_id')->references('id')->on('users')->onDelete('cascade'); $table->timestamps(); }); - } /** @@ -32,4 +31,4 @@ public function down() { Schema::dropIfExists('user_referrals'); } -} +}; diff --git a/database/migrations/2022_07_12_051152_decimals-in-price.php b/database/migrations/2022_07_12_051152_decimals-in-price.php index 4b5fff4a5..cf1a35b4c 100644 --- a/database/migrations/2022_07_12_051152_decimals-in-price.php +++ b/database/migrations/2022_07_12_051152_decimals-in-price.php @@ -4,7 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class DecimalsInPrice extends Migration +return new class extends Migration { /** * Run the migrations. @@ -14,7 +14,7 @@ class DecimalsInPrice extends Migration public function up() { Schema::table('products', function (Blueprint $table) { - $table->decimal('price',['11','2'])->change(); + $table->decimal('price', ['11', '2'])->change(); }); } @@ -29,4 +29,4 @@ public function down() $table->integer('price')->change(); }); } -} +}; diff --git a/database/migrations/2022_08_01_170819_create_tickets_table.php b/database/migrations/2022_08_01_170819_create_tickets_table.php index 5ae8cda7d..265984d02 100644 --- a/database/migrations/2022_08_01_170819_create_tickets_table.php +++ b/database/migrations/2022_08_01_170819_create_tickets_table.php @@ -1,16 +1,16 @@ increments('id'); - $table->string('name'); + $table->string('name'); $table->timestamps(); }); DB::table('ticket_categories')->insert( - array( + [ 'name' => 'Technical', - ) + ] ); DB::table('ticket_categories')->insert( - array( + [ 'name' => 'Billing', - ) + ] ); DB::table('ticket_categories')->insert( - array( + [ 'name' => 'Issue', - ) + ] ); DB::table('ticket_categories')->insert( - array( + [ 'name' => 'Request', - ) + ] ); DB::table('ticket_categories')->insert( - array( + [ 'name' => 'Other', - ) + ] ); } - /** * Reverse the migrations. @@ -56,4 +55,4 @@ public function down() { Schema::dropIfExists('ticket_categories'); } -} +}; diff --git a/database/migrations/2022_08_01_181607_create_ticketcomments_table.php b/database/migrations/2022_08_01_181607_create_ticketcomments_table.php index 58886b457..0893e7207 100644 --- a/database/migrations/2022_08_01_181607_create_ticketcomments_table.php +++ b/database/migrations/2022_08_01_181607_create_ticketcomments_table.php @@ -1,15 +1,15 @@ id(); $table->unsignedBigInteger('user_id')->unsigned(); - $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');; + $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $table->string('status'); $table->string('reason'); $table->timestamps(); @@ -32,4 +32,4 @@ public function down() { Schema::dropIfExists('ticket_blacklists'); } -} +}; diff --git a/database/migrations/2022_08_25_202109_create_partner_discounts_table.php b/database/migrations/2022_08_25_202109_create_partner_discounts_table.php new file mode 100644 index 000000000..b1fcdf97d --- /dev/null +++ b/database/migrations/2022_08_25_202109_create_partner_discounts_table.php @@ -0,0 +1,35 @@ +id(); + $table->foreignId('user_id'); + $table->integer('partner_discount'); + $table->integer('registered_user_discount'); + $table->integer('referral_system_commission'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('partner_discounts'); + } +}; diff --git a/database/migrations/2022_11_29_075851_email_verify_d_b.php b/database/migrations/2022_11_29_075851_email_verify_d_b.php index 04e2663b0..86708aadf 100644 --- a/database/migrations/2022_11_29_075851_email_verify_d_b.php +++ b/database/migrations/2022_11_29_075851_email_verify_d_b.php @@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -class EmailVerifyDB extends Migration +return new class extends Migration { /** * Run the migrations. @@ -26,7 +26,6 @@ public function up() } } - /** * Reverse the migrations. * @@ -38,4 +37,4 @@ public function down() $table->dropColumn('email_verified_reward'); }); } -} +}; diff --git a/database/migrations/2023_01_03_185102_update_make_description_text_in_nests_table.php b/database/migrations/2023_01_03_185102_update_make_description_text_in_nests_table.php new file mode 100644 index 000000000..e007ad5ee --- /dev/null +++ b/database/migrations/2023_01_03_185102_update_make_description_text_in_nests_table.php @@ -0,0 +1,32 @@ +text('description')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nests', function (Blueprint $table) { + $table->string('description')->change(); + }); + } +}; diff --git a/database/migrations/2023_01_05_180333_add_event_column_to_activity_log_table.php b/database/migrations/2023_01_05_180333_add_event_column_to_activity_log_table.php new file mode 100644 index 000000000..7b797fd5e --- /dev/null +++ b/database/migrations/2023_01_05_180333_add_event_column_to_activity_log_table.php @@ -0,0 +1,22 @@ +table(config('activitylog.table_name'), function (Blueprint $table) { + $table->string('event')->nullable()->after('subject_type'); + }); + } + + public function down() + { + Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { + $table->dropColumn('event'); + }); + } +} diff --git a/database/migrations/2023_01_05_180334_add_batch_uuid_column_to_activity_log_table.php b/database/migrations/2023_01_05_180334_add_batch_uuid_column_to_activity_log_table.php new file mode 100644 index 000000000..8f7db6654 --- /dev/null +++ b/database/migrations/2023_01_05_180334_add_batch_uuid_column_to_activity_log_table.php @@ -0,0 +1,22 @@ +table(config('activitylog.table_name'), function (Blueprint $table) { + $table->uuid('batch_uuid')->nullable()->after('properties'); + }); + } + + public function down() + { + Schema::connection(config('activitylog.database_connection'))->table(config('activitylog.table_name'), function (Blueprint $table) { + $table->dropColumn('batch_uuid'); + }); + } +} diff --git a/database/migrations/2023_01_12_135936_settings_to_text.php b/database/migrations/2023_01_12_135936_settings_to_text.php new file mode 100644 index 000000000..2b907b079 --- /dev/null +++ b/database/migrations/2023_01_12_135936_settings_to_text.php @@ -0,0 +1,32 @@ +text('value')->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('nests', function (Blueprint $table) { + $table->string('value')->change(); + }); + } +}; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index e759a5959..6ed3baa03 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -17,6 +17,5 @@ public function run() $this->call([ SettingsSeeder::class, ]); - } } diff --git a/database/seeders/ExampleItemsSeeder.php b/database/seeders/ExampleItemsSeeder.php index 42fb4bbc8..925fda7df 100644 --- a/database/seeders/ExampleItemsSeeder.php +++ b/database/seeders/ExampleItemsSeeder.php @@ -2,9 +2,9 @@ namespace Database\Seeders; +use Database\Seeders\Seeds\ApplicationApiSeeder; use Database\Seeders\Seeds\ProductSeeder; use Database\Seeders\Seeds\ShopProductSeeder; -use Database\Seeders\Seeds\ApplicationApiSeeder; use Database\Seeders\Seeds\UsefulLinksSeeder; use Illuminate\Database\Seeder; @@ -21,8 +21,7 @@ public function run() ProductSeeder::class, ShopProductSeeder::class, ApplicationApiSeeder::class, - UsefulLinksSeeder::class + UsefulLinksSeeder::class, ]); - } } diff --git a/database/seeders/Seeds/ApplicationApiSeeder.php b/database/seeders/Seeds/ApplicationApiSeeder.php index da66c937c..963f848fc 100644 --- a/database/seeders/Seeds/ApplicationApiSeeder.php +++ b/database/seeders/Seeds/ApplicationApiSeeder.php @@ -15,7 +15,7 @@ class ApplicationApiSeeder extends Seeder public function run() { ApplicationApi::create([ - 'memo' => 'admin' + 'memo' => 'admin', ]); } } diff --git a/database/seeders/Seeds/ProductSeeder.php b/database/seeders/Seeds/ProductSeeder.php index 7664dc867..4f5e43754 100644 --- a/database/seeders/Seeds/ProductSeeder.php +++ b/database/seeders/Seeds/ProductSeeder.php @@ -20,7 +20,7 @@ public function run() 'price' => 140, 'memory' => 64, 'disk' => 1000, - 'databases' => 1 + 'databases' => 1, ]); Product::create([ @@ -29,7 +29,7 @@ public function run() 'price' => 210, 'memory' => 128, 'disk' => 2000, - 'databases' => 2 + 'databases' => 2, ]); Product::create([ @@ -38,7 +38,7 @@ public function run() 'price' => 280, 'memory' => 256, 'disk' => 5000, - 'databases' => 5 + 'databases' => 5, ]); } } diff --git a/database/seeders/Seeds/SettingsSeeder.php b/database/seeders/Seeds/SettingsSeeder.php index 9e6f00356..d0179896b 100644 --- a/database/seeders/Seeds/SettingsSeeder.php +++ b/database/seeders/Seeds/SettingsSeeder.php @@ -18,523 +18,639 @@ public function run() Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:INITIAL_CREDITS', ], [ - 'value' => '250', - 'type' => 'integer', - 'description' => 'The initial amount of credits the user starts with.' + 'value' => '250', + 'type' => 'integer', + 'description' => 'The initial amount of credits the user starts with.', ]); Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:INITIAL_SERVER_LIMIT', ], [ - 'value' => '1', - 'type' => 'integer', - 'description' => 'The initial server limit the user starts with.' + 'value' => '1', + 'type' => 'integer', + 'description' => 'The initial server limit the user starts with.', ]); //verify email event Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL', ], [ - 'value' => '250', - 'type' => 'integer', - 'description' => 'Increase in credits after the user has verified their email account.' + 'value' => '250', + 'type' => 'integer', + 'description' => 'Increase in credits after the user has verified their email account.', ]); Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL', ], [ - 'value' => '2', - 'type' => 'integer', - 'description' => 'Increase in server limit after the user has verified their email account.' + 'value' => '2', + 'type' => 'integer', + 'description' => 'Increase in server limit after the user has verified their email account.', ]); //verify discord event Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD', ], [ - 'value' => '375', - 'type' => 'integer', - 'description' => 'Increase in credits after the user has verified their discord account.' + 'value' => '375', + 'type' => 'integer', + 'description' => 'Increase in credits after the user has verified their discord account.', ]); Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD', ], [ - 'value' => '2', - 'type' => 'integer', - 'description' => 'Increase in server limit after the user has verified their discord account.' + 'value' => '2', + 'type' => 'integer', + 'description' => 'Increase in server limit after the user has verified their discord account.', ]); //other Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', ], [ - 'value' => '50', - 'type' => 'integer', - 'description' => 'The minimum amount of credits the user would need to make a server.' + 'value' => '50', + 'type' => 'integer', + 'description' => 'The minimum amount of credits the user would need to make a server.', ]); //purchasing Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE', ], [ - 'value' => '10', - 'type' => 'integer', + 'value' => '10', + 'type' => 'integer', 'description' => 'updates the users server limit to this amount (unless the user already has a higher server limit) after making a purchase with real money, set to 0 to ignore this.', ]); - //force email and discord verification Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:FORCE_EMAIL_VERIFICATION', ], [ - 'value' => 'false', - 'type' => 'boolean', - 'description' => 'Force an user to verify the email adress before creating a server / buying credits.' + 'value' => 'false', + 'type' => 'boolean', + 'description' => 'Force an user to verify the email adress before creating a server / buying credits.', ]); Settings::firstOrCreate([ 'key' => 'SETTINGS::USER:FORCE_DISCORD_VERIFICATION', ], [ - 'value' => 'false', - 'type' => 'boolean', - 'description' => 'Force an user to link an Discord Account before creating a server / buying credits.' + 'value' => 'false', + 'type' => 'boolean', + 'description' => 'Force an user to link an Discord Account before creating a server / buying credits.', ]); //disable ip check on register Settings::firstOrCreate([ 'key' => 'SETTINGS::SYSTEM:REGISTER_IP_CHECK', ], [ - 'value' => 'true', - 'type' => 'boolean', - 'description' => 'Prevent users from making multiple accounts using the same IP address' + 'value' => 'true', + 'type' => 'boolean', + 'description' => 'Prevent users from making multiple accounts using the same IP address', ]); //per_page on allocations request Settings::firstOrCreate([ 'key' => 'SETTINGS::SERVER:ALLOCATION_LIMIT', ], [ - 'value' => '200', + 'value' => '200', + 'type' => 'integer', + 'description' => 'The maximum amount of allocations to pull per node for automatic deployment, if more allocations are being used than this limit is set to, no new servers can be created!', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', + ], [ + 'value' => '0', 'type' => 'integer', - 'description' => 'The maximum amount of allocations to pull per node for automatic deployment, if more allocations are being used than this limit is set to, no new servers can be created!' + 'description' => 'The minimum amount of credits user has to have to create a server. Can be overridden by package limits.' ]); //credits display name Settings::firstOrCreate([ 'key' => 'SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME', ], [ - 'value' => 'Credits', - 'type' => 'string', - 'description' => 'Set the display name of your currency :)' + 'value' => 'Credits', + 'type' => 'string', + 'description' => 'Set the display name of your currency :)', ]); //credits display name Settings::firstOrCreate([ 'key' => 'SETTINGS::SYSTEM:SERVER_CREATE_CHARGE_FIRST_HOUR', ], [ - 'value' => 'true', - 'type' => 'boolean', - 'description' => 'Charges the first hour worth of credits upon creating a server.' + 'value' => 'true', + 'type' => 'boolean', + 'description' => 'Charges the first hour worth of credits upon creating a server.', ]); //sales tax Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:SALES_TAX', + 'key' => 'SETTINGS::PAYMENTS:SALES_TAX', ], [ 'value' => '0', - 'type' => 'integer', - 'description' => 'The %-value of tax that will be added to the product price on checkout' + 'type' => 'integer', + 'description' => 'The %-value of tax that will be added to the product price on checkout', ]); //Invoices enabled Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:ENABLED', + 'key' => 'SETTINGS::INVOICE:ENABLED', ], [ 'value' => 'false', - 'type' => 'boolean', - 'description' => 'Enables or disables the invoice feature for payments' + 'type' => 'boolean', + 'description' => 'Enables or disables the invoice feature for payments', ]); //Invoice company name Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:COMPANY_NAME', + 'key' => 'SETTINGS::INVOICE:COMPANY_NAME', ], [ 'value' => '', - 'type' => 'string', - 'description' => 'The name of the Company on the Invoices' + 'type' => 'string', + 'description' => 'The name of the Company on the Invoices', ]); //Invoice company address Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:COMPANY_ADDRESS', + 'key' => 'SETTINGS::INVOICE:COMPANY_ADDRESS', ], [ 'value' => '', - 'type' => 'string', - 'description' => 'The address of the Company on the Invoices' + 'type' => 'string', + 'description' => 'The address of the Company on the Invoices', ]); //Invoice company phone Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:COMPANY_PHONE', + 'key' => 'SETTINGS::INVOICE:COMPANY_PHONE', ], [ 'value' => '', - 'type' => 'string', - 'description' => 'The phone number of the Company on the Invoices' + 'type' => 'string', + 'description' => 'The phone number of the Company on the Invoices', ]); //Invoice company mail Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:COMPANY_MAIL', + 'key' => 'SETTINGS::INVOICE:COMPANY_MAIL', ], [ 'value' => '', - 'type' => 'string', - 'description' => 'The email address of the Company on the Invoices' + 'type' => 'string', + 'description' => 'The email address of the Company on the Invoices', ]); //Invoice VAT Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:COMPANY_VAT', + 'key' => 'SETTINGS::INVOICE:COMPANY_VAT', ], [ 'value' => '', - 'type' => 'string', - 'description' => 'The VAT-Number of the Company on the Invoices' + 'type' => 'string', + 'description' => 'The VAT-Number of the Company on the Invoices', ]); //Invoice Website Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:COMPANY_WEBSITE', + 'key' => 'SETTINGS::INVOICE:COMPANY_WEBSITE', ], [ 'value' => '', - 'type' => 'string', - 'description' => 'The Website of the Company on the Invoices' + 'type' => 'string', + 'description' => 'The Website of the Company on the Invoices', ]); //Invoice Website Settings::firstOrCreate([ - 'key' => 'SETTINGS::INVOICE:PREFIX', + 'key' => 'SETTINGS::INVOICE:PREFIX', ], [ 'value' => 'INV', - 'type' => 'string', - 'description' => 'The invoice prefix' + 'type' => 'string', + 'description' => 'The invoice prefix', ]); //Locale Settings::firstOrCreate([ - 'key' => 'SETTINGS::LOCALE:DEFAULT', + 'key' => 'SETTINGS::LOCALE:DEFAULT', ], [ 'value' => 'en', - 'type' => 'string', - 'description' => 'The default Language the dashboard will be shown in' + 'type' => 'string', + 'description' => 'The default Language the dashboard will be shown in', ]); //Dynamic locale Settings::firstOrCreate([ - 'key' => 'SETTINGS::LOCALE:DYNAMIC', + 'key' => 'SETTINGS::LOCALE:DYNAMIC', ], [ 'value' => 'false', - 'type' => 'boolean', - 'description' => 'If this is true, the Language will change to the Clients browserlanguage or default.' + 'type' => 'boolean', + 'description' => 'If this is true, the Language will change to the Clients browserlanguage or default.', ]); //User can change Locale Settings::firstOrCreate([ - 'key' => 'SETTINGS::LOCALE:CLIENTS_CAN_CHANGE', + 'key' => 'SETTINGS::LOCALE:CLIENTS_CAN_CHANGE', ], [ 'value' => 'false', - 'type' => 'boolean', - 'description' => 'If this is true, the clients will be able to change their Locale.' + 'type' => 'boolean', + 'description' => 'If this is true, the clients will be able to change their Locale.', ]); //Locale Settings::firstOrCreate([ - 'key' => 'SETTINGS::LOCALE:AVAILABLE', + 'key' => 'SETTINGS::LOCALE:AVAILABLE', ], [ 'value' => '', - 'type' => 'string', - 'description' => 'The available languages' + 'type' => 'string', + 'description' => 'The available languages', ]); //Locale Settings::firstOrCreate([ - 'key' => 'SETTINGS::LOCALE:DATATABLES', + 'key' => 'SETTINGS::LOCALE:DATATABLES', ], [ 'value' => 'en-gb', - 'type' => 'string', - 'description' => 'The Language of the Datatables. Grab the Language-Codes from here https://datatables.net/plug-ins/i18n/' + 'type' => 'string', + 'description' => 'The Language of the Datatables. Grab the Language-Codes from here https://datatables.net/plug-ins/i18n/', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:PAYPAL:SECRET', + 'key' => 'SETTINGS::PAYMENTS:PAYPAL:SECRET', ], [ 'value' => env('PAYPAL_SECRET', ''), - 'type' => 'string', - 'description' => 'Your PayPal Secret-Key ( https://developer.paypal.com/docs/integration/direct/rest/)' + 'type' => 'string', + 'description' => 'Your PayPal Secret-Key ( https://developer.paypal.com/docs/integration/direct/rest/)', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID', + 'key' => 'SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID', ], [ 'value' => env('PAYPAL_CLIENT_ID', ''), - 'type' => 'string', - 'description' => 'Your PayPal Client_ID' + 'type' => 'string', + 'description' => 'Your PayPal Client_ID', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET', + 'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET', ], [ 'value' => env('PAYPAL_SANDBOX_SECRET', ''), - 'type' => 'string', - 'description' => 'Your PayPal SANDBOX Secret-Key used for testing ' + 'type' => 'string', + 'description' => 'Your PayPal SANDBOX Secret-Key used for testing ', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID', + 'key' => 'SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID', ], [ 'value' => env('PAYPAL_SANDBOX_CLIENT_ID', ''), - 'type' => 'string', - 'description' => 'Your PayPal SANDBOX Client-ID used for testing ' + 'type' => 'string', + 'description' => 'Your PayPal SANDBOX Client-ID used for testing ', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:STRIPE:SECRET', + 'key' => 'SETTINGS::PAYMENTS:STRIPE:SECRET', ], [ 'value' => env('STRIPE_SECRET', ''), - 'type' => 'string', - 'description' => 'Your Stripe Secret-Key ( https://dashboard.stripe.com/account/apikeys )' + 'type' => 'string', + 'description' => 'Your Stripe Secret-Key ( https://dashboard.stripe.com/account/apikeys )', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET', + 'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET', ], [ 'value' => env('STRIPE_ENDPOINT_SECRET', ''), - 'type' => 'string', - 'description' => 'Your Stripe endpoint secret-key' + 'type' => 'string', + 'description' => 'Your Stripe endpoint secret-key', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:STRIPE:TEST_SECRET', + 'key' => 'SETTINGS::PAYMENTS:STRIPE:TEST_SECRET', ], [ 'value' => env('STRIPE_TEST_SECRET', ''), - 'type' => 'string', - 'description' => 'Your Stripe test secret-key' + 'type' => 'string', + 'description' => 'Your Stripe test secret-key', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET', + 'key' => 'SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET', ], [ 'value' => env('STRIPE_ENDPOINT_TEST_SECRET', ''), - 'type' => 'string', - 'description' => 'Your Stripe endpoint test secret-key' + 'type' => 'string', + 'description' => 'Your Stripe endpoint test secret-key', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::PAYMENTS:STRIPE:METHODS', + 'key' => 'SETTINGS::PAYMENTS:STRIPE:METHODS', ], [ 'value' => env('STRIPE_METHODS', 'card,sepa_debit'), - 'type' => 'string', - 'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options)' + 'type' => 'string', + 'description' => 'Comma seperated list of payment methods that are enabled (https://stripe.com/docs/payments/payment-methods/integration-options)', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::DISCORD:CLIENT_ID', + 'key' => 'SETTINGS::DISCORD:CLIENT_ID', ], [ 'value' => env('DISCORD_CLIENT_ID', ''), - 'type' => 'string', - 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/' + 'type' => 'string', + 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::DISCORD:CLIENT_SECRET', + 'key' => 'SETTINGS::DISCORD:CLIENT_SECRET', ], [ 'value' => env('DISCORD_CLIENT_SECRET', ''), - 'type' => 'string', - 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/' + 'type' => 'string', + 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::DISCORD:BOT_TOKEN', + 'key' => 'SETTINGS::DISCORD:BOT_TOKEN', ], [ - 'value' => env('DISCORD_BOT_TOKEN', ''), - 'type' => 'string', - 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/' + 'value' => env('DISCORD_BOT_TOKEN', ''), + 'type' => 'string', + 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::DISCORD:GUILD_ID', + 'key' => 'SETTINGS::DISCORD:GUILD_ID', ], [ - 'value' => env('DISCORD_GUILD_ID', ''), - 'type' => 'string', - 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/' + 'value' => env('DISCORD_GUILD_ID', ''), + 'type' => 'string', + 'description' => 'Discord API Credentials - https://discordapp.com/developers/applications/', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::DISCORD:ROLE_ID', + 'key' => 'SETTINGS::DISCORD:ROLE_ID', ], [ 'value' => env('DISCORD_ROLE_ID', ''), - 'type' => 'string', - 'description' => 'Discord role that will be assigned to users when they register' + 'type' => 'string', + 'description' => 'Discord role that will be assigned to users when they register', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::DISCORD:INVITE_URL', + 'key' => 'SETTINGS::DISCORD:INVITE_URL', ], [ 'value' => env('DISCORD_INVITE_URL', ''), - 'type' => 'string', - 'description' => 'The invite URL to your Discord Server' + 'type' => 'string', + 'description' => 'The invite URL to your Discord Server', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN', + 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN', ], [ 'value' => env('PTERODACTYL_TOKEN', ''), - 'type' => 'string', - 'description' => 'Admin API Token from Pterodactyl Panel - necessary for the Panel to work. The Key needs all read&write permissions!' + 'type' => 'string', + 'description' => 'Admin API Token from Pterodactyl Panel - necessary for the Panel to work. The Key needs all read&write permissions!', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:URL', + 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:URL', ], [ 'value' => env('PTERODACTYL_URL', ''), - 'type' => 'string', - 'description' => 'The URL to your Pterodactyl Panel. Must not end with a / ' + 'type' => 'string', + 'description' => 'The URL to your Pterodactyl Panel. Must not end with a / ', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT', + 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:PER_PAGE_LIMIT', ], [ 'value' => 200, - 'type' => 'integer', - 'description' => 'The Pterodactyl API perPage limit. It is necessary to set it higher than your server count.' + 'type' => 'integer', + 'description' => 'The Pterodactyl API perPage limit. It is necessary to set it higher than your server count.', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MISC:PHPMYADMIN:URL', + 'key' => 'SETTINGS::MISC:PHPMYADMIN:URL', ], [ 'value' => env('PHPMYADMIN_URL', ''), - 'type' => 'string', - 'description' => 'The URL to your PHPMYADMIN Panel. Must not end with a /, remove to remove database button' + 'type' => 'string', + 'description' => 'The URL to your PHPMYADMIN Panel. Must not end with a /, remove to remove database button', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::RECAPTCHA:SITE_KEY', + 'key' => 'SETTINGS::RECAPTCHA:SITE_KEY', ], [ 'value' => env('RECAPTCHA_SITE_KEY', '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI'), - 'type' => 'string', - 'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)' + 'type' => 'string', + 'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::RECAPTCHA:SECRET_KEY', + 'key' => 'SETTINGS::RECAPTCHA:SECRET_KEY', ], [ 'value' => env('RECAPTCHA_SECRET_KEY', '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe'), - 'type' => 'string', - 'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)' + 'type' => 'string', + 'description' => 'Google Recaptcha API Credentials - https://www.google.com/recaptcha/admin - reCaptcha V2 (not v3)', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::RECAPTCHA:ENABLED', + 'key' => 'SETTINGS::RECAPTCHA:ENABLED', ], [ 'value' => 'true', - 'type' => 'boolean', - 'description' => 'Enables or disables the ReCaptcha feature on the registration/login page' + 'type' => 'boolean', + 'description' => 'Enables or disables the ReCaptcha feature on the registration/login page', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:MAILER', + 'key' => 'SETTINGS::MAIL:MAILER', ], [ 'value' => env('MAIL_MAILER', 'smtp'), - 'type' => 'string', - 'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap)' + 'type' => 'string', + 'description' => 'Selected Mailer (smtp, mailgun, sendgrid, mailtrap)', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:HOST', + 'key' => 'SETTINGS::MAIL:HOST', ], [ 'value' => env('MAIL_HOST', 'localhost'), - 'type' => 'string', - 'description' => 'Mailer Host Adress' + 'type' => 'string', + 'description' => 'Mailer Host Address', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:PORT', + 'key' => 'SETTINGS::MAIL:PORT', ], [ - 'value' => env('MAIL_PORT', '25'), - 'type' => 'string', - 'description' => 'Mailer Server Port' + 'value' => env('MAIL_PORT', '25'), + 'type' => 'string', + 'description' => 'Mailer Server Port', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:USERNAME', + 'key' => 'SETTINGS::MAIL:USERNAME', ], [ - 'value' => env('MAIL_USERNAME', ''), - 'type' => 'string', - 'description' => 'Mailer Username' + 'value' => env('MAIL_USERNAME', ''), + 'type' => 'string', + 'description' => 'Mailer Username', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:PASSWORD', + 'key' => 'SETTINGS::MAIL:PASSWORD', ], [ - 'value' => env('MAIL_PASSWORD', ''), - 'type' => 'string', - 'description' => 'Mailer Password' + 'value' => env('MAIL_PASSWORD', ''), + 'type' => 'string', + 'description' => 'Mailer Password', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:ENCRYPTION', + 'key' => 'SETTINGS::MAIL:ENCRYPTION', ], [ - 'value' => env('MAIL_ENCRYPTION', 'tls'), - 'type' => 'string', - 'description' => 'Mailer Encryption (tls, ssl)' + 'value' => env('MAIL_ENCRYPTION', 'tls'), + 'type' => 'string', + 'description' => 'Mailer Encryption (tls, ssl)', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:FROM_ADDRESS', + 'key' => 'SETTINGS::MAIL:FROM_ADDRESS', ], [ - 'value' => env('MAIL_FROM_ADDRESS', ''), - 'type' => 'string', - 'description' => 'Mailer From Address' + 'value' => env('MAIL_FROM_ADDRESS', ''), + 'type' => 'string', + 'description' => 'Mailer From Address', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::MAIL:FROM_NAME', + 'key' => 'SETTINGS::MAIL:FROM_NAME', ], [ 'value' => env('APP_NAME', 'Controlpanel'), - 'type' => 'string', - 'description' => 'Mailer From Name' + 'type' => 'string', + 'description' => 'Mailer From Name', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::REFERRAL::ENABLED', + 'key' => 'SETTINGS::REFERRAL::ENABLED', ], [ - 'value' =>"true", - 'type' => 'string', - 'description' => 'Enable or disable the referral system' + 'value' => 'false', + 'type' => 'string', + 'description' => 'Enable or disable the referral system', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::REFERRAL::ALWAYS_GIVE_COMMISSION', + ], [ + 'value' => 'false', + 'type' => 'string', + 'description' => 'Whether referrals get percentage commission only on first purchase or on every purchase', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::REFERRAL::REWARD', + 'key' => 'SETTINGS::REFERRAL::REWARD', ], [ - 'value' =>100, - 'type' => 'integer', - 'description' => 'Credit reward a user should receive when a user registers with his referral code' + 'value' => 100, + 'type' => 'integer', + 'description' => 'Credit reward a user should receive when a user registers with his referral code', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::REFERRAL::ALLOWED', + 'key' => 'SETTINGS::REFERRAL::ALLOWED', ], [ - 'value' =>"client", - 'type' => 'string', - 'description' => 'Who should be allowed to to use the referral code. all/client' + 'value' => 'client', + 'type' => 'string', + 'description' => 'Who should be allowed to to use the referral code. all/client', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::REFERRAL:MODE', + 'key' => 'SETTINGS::REFERRAL:MODE', ], [ - 'value' =>"sign-up", - 'type' => 'string', - 'description' => 'Whether referrals get Credits on User-Registration or if a User buys credits' + 'value' => 'sign-up', + 'type' => 'string', + 'description' => 'Whether referrals get Credits on User-Registration or if a User buys credits', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::REFERRAL:PERCENTAGE', + 'key' => 'SETTINGS::REFERRAL:PERCENTAGE', ], [ - 'value' =>100, - 'type' => 'integer', - 'description' => 'The Percentage Value a referred user gets' + 'value' => 100, + 'type' => 'integer', + 'description' => 'The Percentage Value a referred user gets', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN', + 'key' => 'SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN', ], [ - 'value' =>"", - 'type' => 'string', - 'description' => 'The Client API Key of an Pterodactyl Admin Account' + 'value' => '', + 'type' => 'string', + 'description' => 'The Client API Key of an Pterodactyl Admin Account', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::SYSTEM:ENABLE_UPGRADE', + 'key' => 'SETTINGS::SYSTEM:ENABLE_UPGRADE', ], [ - 'value' => "false", - 'type' => 'boolean', - 'description' => 'Enables the updgrade/downgrade feature for servers' + 'value' => 'false', + 'type' => 'boolean', + 'description' => 'Enables the updgrade/downgrade feature for servers', ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS', + 'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_SERVERS', ], [ - 'value' => "true", + 'value' => 'true', + 'type' => 'boolean', + 'description' => 'Enable/disable the creation of new servers', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', + ], [ + 'value' => 'false', + 'type' => 'boolean', + 'description' => 'Enable/disable the creation of new users', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:SHOW_IMPRINT', + ], [ + + 'value' => "false", 'type' => 'boolean', - 'description' => 'Enable/disable the creation of new servers' + 'description' => 'Enable/disable imprint in footer' + ]); Settings::firstOrCreate([ - 'key' => 'SETTINGS::SYSTEM:CREATION_OF_NEW_USERS', + 'key' => 'SETTINGS::SYSTEM:SHOW_PRIVACY', ], [ - 'value' => "true", + + 'value' => "false", 'type' => 'boolean', - 'description' => 'Enable/disable the creation of new users' + 'description' => 'Enable/disable privacy policy in footer' + + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:SHOW_TOS', + ], [ + 'value' => 'false', + 'type' => 'boolean', + 'description' => 'Enable/disable Terms of Service in footer', + ]); + + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:ALERT_ENABLED', + ], [ + 'value' => 'false', + 'type' => 'boolean', + 'description' => 'Enable/disable Alerts on Homepage', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:ALERT_TYPE', + ], [ + 'value' => 'dark', + 'type' => 'text', + 'description' => 'Changes the Color of the Alert', + ]); + + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:ALERT_MESSAGE', + ], [ + 'value' => '', + 'type' => 'text', + 'description' => 'Changes the Content the Alert', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:THEME', + ], [ + 'value' => 'default', + 'type' => 'text', + 'description' => 'Current active theme', + ]); + + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:USEFULLINKS_ENABLED', + ], [ + 'value' => 'true', + 'type' => 'boolean', + 'description' => 'Enable/disable Useful Links on Homepage', + ]); + + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:MOTD_ENABLED', + ], [ + 'value' => 'true', + 'type' => 'boolean', + 'description' => 'Enable/disable MOTD on Homepage', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:MOTD_MESSAGE', + ], [ + 'value' => '

Controlpanel.gg

+

Thank you for using our Software

+

If you have any questions, make sure to join our Discord

+

(you can change this message in the Settings )

', + 'type' => 'text', + 'description' => 'MOTD Message', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:SEO_TITLE', + ], [ + 'value' => 'Controlpanel.gg', + 'type' => 'text', + 'description' => 'The SEO Title', + ]); + + Settings::firstOrCreate([ + 'key' => 'SETTINGS::SYSTEM:SEO_DESCRIPTION', + ], [ + 'value' => 'Billing software for Pterodactyl Dashboard!', + 'type' => 'text', + 'description' => 'SEO Description', + ]); + Settings::firstOrCreate([ + 'key' => 'SETTINGS::TICKET:NOTIFY', + ], [ + 'value' => 'all', + 'type' => 'text', + 'description' => 'Who will get a Email Notifcation on new Tickets', ]); } } diff --git a/database/seeders/Seeds/UsefulLinksSeeder.php b/database/seeders/Seeds/UsefulLinksSeeder.php index e5db8e391..57f45a4ac 100644 --- a/database/seeders/Seeds/UsefulLinksSeeder.php +++ b/database/seeders/Seeds/UsefulLinksSeeder.php @@ -18,19 +18,19 @@ public function run() 'icon' => 'fas fa-egg', 'title' => 'Pterodactyl Panel', 'link' => env('PTERODACTYL_URL', 'http://localhost'), - 'description' => 'Use your servers on our pterodactyl panel (You can use the same login details)' + 'description' => 'Use your servers on our pterodactyl panel (You can use the same login details)', ]); UsefulLink::create([ 'icon' => 'fas fa-database', 'title' => 'phpMyAdmin', 'link' => env('PHPMYADMIN_URL', 'http://localhost'), - 'description' => 'View your database online using phpMyAdmin' + 'description' => 'View your database online using phpMyAdmin', ]); UsefulLink::create([ 'icon' => 'fab fa-discord', 'title' => 'Discord', - 'link' => env('DISCORD_INVITE_URL' , 'https://discord.gg/4Y6HjD2uyU'), - 'description' => 'Need a helping hand? Want to chat? Got any questions? Join our discord!' + 'link' => env('DISCORD_INVITE_URL', 'https://discord.gg/4Y6HjD2uyU'), + 'description' => 'Need a helping hand? Want to chat? Got any questions? Join our discord!', ]); } } diff --git a/database/seeders/Seeds/UserSeeder.php b/database/seeders/Seeds/UserSeeder.php index d96a6669e..ed407b3b6 100644 --- a/database/seeders/Seeds/UserSeeder.php +++ b/database/seeders/Seeds/UserSeeder.php @@ -17,7 +17,7 @@ public function run() { User::factory() ->count(10) - ->has(Server::factory()->count(rand(1,3)) , 'servers') + ->has(Server::factory()->count(rand(1, 3)), 'servers') ->create(); } } diff --git a/resources/lang/bg.json b/lang/bg.json similarity index 99% rename from resources/lang/bg.json rename to lang/bg.json index b710be84c..dbd6881a4 100644 --- a/resources/lang/bg.json +++ b/lang/bg.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "Š¼Š¾Š»Ń, съŠ·Š“Š°Š¹Ń‚Šµ фŠ°Š¹Š», Š½Š°Ń€ŠµŃ‡ŠµŠ½ \"install.lock\" Š² Š¾ŃŠ½Š¾Š²Š½Š°Ń‚Š° Š“ŠøрŠµŠŗтŠ¾Ń€Šøя Š½Š° тŠ°Š±Š»Š¾Ń‚Š¾ сŠø. Š’ ŠæрŠ¾Ń‚ŠøŠ²ŠµŠ½ сŠ»ŃƒŃ‡Š°Š¹ Š½ŃŠ¼Š° Š“Š° сŠµ Š·Š°Ń€ŠµŠ¶Š“Š°Ń‚ Š½ŠøŠŗŠ°ŠŗŠ²Šø Š½Š°ŃŃ‚Ń€Š¾Š¹ŠŗŠø!", "or click here": "ŠøŠ»Šø щрŠ°ŠŗŠ½ŠµŃ‚Šµ туŠŗ", "Company Name": "Š˜Š¼Šµ Š½Š° ŠŗŠ¾Š¼ŠæŠ°Š½ŠøятŠ°", - "Company Adress": "ŠŠ“рŠµŃ Š½Š° ŠŗŠ¾Š¼ŠæŠ°Š½ŠøятŠ°", + "Company Address": "ŠŠ“рŠµŃ Š½Š° ŠŗŠ¾Š¼ŠæŠ°Š½ŠøятŠ°", "Company Phonenumber": "Š¤ŠøрŠ¼ŠµŠ½ тŠµŠ»ŠµŃ„Š¾Š½ŠµŠ½ Š½Š¾Š¼ŠµŃ€", "VAT ID": "Š˜Š“ŠµŠ½Ń‚ŠøфŠøŠŗŠ°Ń†ŠøŠ¾Š½ŠµŠ½ Š½Š¾Š¼ŠµŃ€ Š½Š° Š”Š”Š”", - "Company E-Mail Adress": "Š¤ŠøрŠ¼ŠµŠ½ ŠøŠ¼ŠµŠ¹Š» Š°Š“рŠµŃ", + "Company E-Mail Address": "Š¤ŠøрŠ¼ŠµŠ½ ŠøŠ¼ŠµŠ¹Š» Š°Š“рŠµŃ", "Company Website": "Š¤ŠøрŠ¼ŠµŠ½ Š£ŠµŠ±ŃŠ°Š¹Ń‚", "Invoice Prefix": "ŠŸŃ€ŠµŃ„ŠøŠŗс Š½Š° фŠ°ŠŗтурŠ°", "Enable Invoices": "ŠŠŗтŠøŠ²ŠøрŠ°Š¹ Š¤Š°ŠŗтурŠø", @@ -199,7 +199,7 @@ "Mail Username": "Mail ŠŸŠ¾Ń‚Ń€ŠµŠ±ŠøтŠµŠ»ŃŠŗŠ¾ ŠøŠ¼Šµ", "Mail Password": "ŠœŠ°il ŠŸŠ°Ń€Š¾Š»Š°", "Mail Encryption": "Mail ŠšŃ€ŠøŠæтŠøрŠ°Š½Šµ", - "Mail From Adress": "Mail Š¾Ń‚ Š°Š“рŠµŃ", + "Mail From Address": "Mail Š¾Ń‚ Š°Š“рŠµŃ", "Mail From Name": "Mail Š¾Ń‚ ŠøŠ¼Šµ", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Š ŃƒŃŠŗŠø", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/bs.json b/lang/bs.json similarity index 99% rename from resources/lang/bs.json rename to lang/bs.json index 1a5e73c37..8a84b67a3 100644 --- a/resources/lang/bs.json +++ b/lang/bs.json @@ -160,10 +160,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!", "or click here": "or click here", "Company Name": "Company Name", - "Company Adress": "Company Adress", + "Company Address": "Company Address", "Company Phonenumber": "Company Phonenumber", "VAT ID": "VAT ID", - "Company E-Mail Adress": "Company E-Mail Adress", + "Company E-Mail Address": "Company E-Mail Address", "Company Website": "Company Website", "Invoice Prefix": "Invoice Prefix", "Enable Invoices": "Enable Invoices", @@ -185,7 +185,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -442,4 +442,4 @@ "zh": "Chinese", "tr": "Turkish", "ru": "Russian" -} \ No newline at end of file +} diff --git a/resources/lang/cs.json b/lang/cs.json similarity index 99% rename from resources/lang/cs.json rename to lang/cs.json index 6e4eb0064..7f7235420 100644 --- a/resources/lang/cs.json +++ b/lang/cs.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "prosĆ­m vytvoř soubor kterĆ½ bude pojmenovĆ”n install.lock v KontrolnĆ­m panelu (hlavnĆ­ složka)\nPokud tak neudělĆ”Å”, Å¾Ć”dnĆ© změny nebudou načteny!", "or click here": "nebo klikněte sem", "Company Name": "NĆ”zev společnosti", - "Company Adress": "Adresa Firmy", + "Company Address": "Adresa Firmy", "Company Phonenumber": "Telefon společnosti", "VAT ID": "DIČ", - "Company E-Mail Adress": "E-mailovĆ” adresa společnosti", + "Company E-Mail Address": "E-mailovĆ” adresa společnosti", "Company Website": "Web společnosti", "Invoice Prefix": "Prefix pro faktury", "Enable Invoices": "Povolit faktury", @@ -199,7 +199,7 @@ "Mail Username": "UživatelskĆ© jmĆ©no pro e-mail", "Mail Password": "E-mailovĆ© heslo", "Mail Encryption": "Å ifrovĆ”nĆ­ e-mailu", - "Mail From Adress": "E-mail odesĆ­latele", + "Mail From Address": "E-mail odesĆ­latele", "Mail From Name": "NĆ”zev odeÅ”Ć­latele", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "RuÅ”tina", "sv": "Å vĆ©dÅ”tina", "sk": "Slovensky" -} \ No newline at end of file +} diff --git a/resources/lang/cs/auth.php b/lang/cs/auth.php similarity index 87% rename from resources/lang/cs/auth.php rename to lang/cs/auth.php index a5ad7d092..619f4feb9 100644 --- a/resources/lang/cs/auth.php +++ b/lang/cs/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Tyto přihlaÅ”ovacĆ­ Ćŗdaje neodpovĆ­dajĆ­ žadnĆ©mu zĆ”znamu.', + 'failed' => 'Tyto přihlaÅ”ovacĆ­ Ćŗdaje neodpovĆ­dajĆ­ žadnĆ©mu zĆ”znamu.', 'password' => 'ZadanĆ© heslo je neplatnĆ©.', 'throttle' => 'PÅ™Ć­liÅ” mnoho pokusÅÆ o přihlĆ”Å”enĆ­. Zkuste to prosĆ­m znovu za :seconds sekund.', ]; diff --git a/resources/lang/cs/pagination.php b/lang/cs/pagination.php similarity index 92% rename from resources/lang/cs/pagination.php rename to lang/cs/pagination.php index 356b31893..099afea87 100644 --- a/resources/lang/cs/pagination.php +++ b/lang/cs/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'dalÅ”Ć­ »', + 'next' => 'dalÅ”Ć­ »', 'previous' => '« předchozĆ­', ]; diff --git a/resources/lang/cs/passwords.php b/lang/cs/passwords.php similarity index 64% rename from resources/lang/cs/passwords.php rename to lang/cs/passwords.php index 75ca9852e..f63ee8e46 100644 --- a/resources/lang/cs/passwords.php +++ b/lang/cs/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Heslo bylo obnoveno!', - 'sent' => 'E-mail s instrukcemi k obnovenĆ­ hesla byl odeslĆ”n!', + 'reset' => 'Heslo bylo obnoveno!', + 'sent' => 'E-mail s instrukcemi k obnovenĆ­ hesla byl odeslĆ”n!', 'throttled' => 'Počkejte prosĆ­m a zkuste to znovu.', - 'token' => 'Klƭč pro obnovu hesla je nesprĆ”vnĆ½.', - 'user' => 'Nepodařilo se najĆ­t uživatele s touto e-mailovou adresou.', + 'token' => 'Klƭč pro obnovu hesla je nesprĆ”vnĆ½.', + 'user' => 'Nepodařilo se najĆ­t uživatele s touto e-mailovou adresou.', ]; diff --git a/lang/cs/validation.php b/lang/cs/validation.php new file mode 100644 index 000000000..7c1f35edb --- /dev/null +++ b/lang/cs/validation.php @@ -0,0 +1,135 @@ + ':attribute musĆ­ bĆ½t přijat.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + 'active_url' => ':attribute nenĆ­ platnou URL adresou.', + 'after' => ':attribute musĆ­ bĆ½t datum po :date.', + 'after_or_equal' => ':attribute musĆ­ bĆ½t datum :date nebo pozdějÅ”Ć­.', + 'alpha' => ':attribute mÅÆže obsahovat pouze pĆ­smena.', + 'alpha_dash' => ':attribute mÅÆže obsahovat pouze pĆ­smena, čƭslice, pomlčky a podtrÅ¾Ć­tka. ČeskĆ© znaky (Ć”, Ć©, Ć­, Ć³, Ćŗ, ÅÆ, ž, Å”, č, ř, ď, Å„, ň) nejsou podporovĆ”ny.', + 'alpha_num' => ':attribute mÅÆže obsahovat pouze pĆ­smena a čƭslice.', + 'array' => ':attribute musĆ­ bĆ½t pole.', + 'attached' => 'Tento :attribute je již připojen.', + 'before' => ':attribute musĆ­ bĆ½t datum před :date.', + 'before_or_equal' => 'Datum :attribute musĆ­ bĆ½t před nebo rovno :date.', + 'between' => [ + 'array' => ':attribute musĆ­ obsahovat nejmĆ©ně :min a nesmĆ­ obsahovat vĆ­ce než :max prvkÅÆ.', + 'file' => ':attribute musĆ­ bĆ½t větÅ”Ć­ než :min a menÅ”Ć­ než :max KilobytÅÆ.', + 'numeric' => ':attribute musĆ­ bĆ½t hodnota mezi :min a :max.', + 'string' => ':attribute musĆ­ bĆ½t delÅ”Ć­ než :min a kratÅ”Ć­ než :max znakÅÆ.', + ], + 'boolean' => ':attribute musĆ­ bĆ½t true nebo false', + 'confirmed' => ':attribute nesouhlasĆ­.', + 'current_password' => 'SoučasnĆ© heslo nenĆ­ spravnĆ©.', + 'date' => ':attribute musĆ­ bĆ½t platnĆ© datum.', + 'date_equals' => ':attribute musĆ­ bĆ½t datum shodnĆ© s :date.', + 'date_format' => ':attribute nenĆ­ platnĆ½ formĆ”t data podle :format.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => ':attribute a :other se musĆ­ liÅ”it.', + 'digits' => ':attribute musĆ­ bĆ½t :digits pozic dlouhĆ©.', + 'digits_between' => ':attribute musĆ­ bĆ½t dlouhĆ© nejmĆ©ně :min a nejvĆ­ce :max pozic.', + 'dimensions' => ':attribute mĆ” neplatnĆ© rozměry.', + 'distinct' => ':attribute mĆ” duplicitnĆ­ hodnotu.', + 'email' => ':attribute nenĆ­ platnĆ½ formĆ”t.', + 'ends_with' => ':attribute musĆ­ končit jednou z nĆ”sledujĆ­cĆ­ch hodnot: :values', + 'exists' => 'ZvolenĆ” hodnota pro :attribute nenĆ­ platnĆ”.', + 'file' => ':attribute musĆ­ bĆ½t soubor.', + 'filled' => ':attribute musĆ­ bĆ½t vyplněno.', + 'gt' => [ + 'array' => 'Pole :attribute musĆ­ mĆ­t vĆ­ce prvkÅÆ než :value.', + 'file' => 'Velikost souboru :attribute musĆ­ bĆ½t větÅ”Ć­ než :value kB.', + 'numeric' => ':attribute musĆ­ bĆ½t větÅ”Ć­ než :value.', + 'string' => 'Počet znakÅÆ :attribute musĆ­ bĆ½t větÅ”Ć­ :value.', + ], + 'gte' => [ + 'array' => 'Pole :attribute musĆ­ mĆ­t :value prvkÅÆ nebo vĆ­ce.', + 'file' => 'Velikost souboru :attribute musĆ­ bĆ½t větÅ”Ć­ nebo rovno :value kB.', + 'numeric' => ':attribute musĆ­ bĆ½t větÅ”Ć­ nebo rovno :value.', + 'string' => 'Počet znakÅÆ :attribute musĆ­ bĆ½t větÅ”Ć­ nebo rovno :value.', + ], + 'image' => ':attribute musĆ­ bĆ½t obrĆ”zek.', + 'in' => 'ZvolenĆ” hodnota pro :attribute je neplatnĆ”.', + 'in_array' => ':attribute nenĆ­ obsažen v :other.', + 'integer' => ':attribute musĆ­ bĆ½t celĆ© čƭslo.', + 'ip' => ':attribute musĆ­ bĆ½t platnou IP adresou.', + 'ipv4' => ':attribute musĆ­ bĆ½t platnĆ” IPv4 adresa.', + 'ipv6' => ':attribute musĆ­ bĆ½t platnĆ” IPv6 adresa.', + 'json' => ':attribute musĆ­ bĆ½t platnĆ½ JSON řetězec.', + 'lt' => [ + 'array' => ':attribute by měl obsahovat mĆ©ně než :value položek.', + 'file' => 'Velikost souboru :attribute musĆ­ bĆ½t menÅ”Ć­ než :value kB.', + 'numeric' => ':attribute musĆ­ bĆ½t menÅ”Ć­ než :value.', + 'string' => ':attribute musĆ­ obsahovat mĆ©ně než :value znakÅÆ.', + ], + 'lte' => [ + 'array' => ':attribute by měl obsahovat maximĆ”lně :value položek.', + 'file' => 'Velikost souboru :attribute musĆ­ bĆ½t menÅ”Ć­ než :value kB.', + 'numeric' => ':attribute musĆ­ bĆ½t menÅ”Ć­ nebo rovno než :value.', + 'string' => ':attribute nesmĆ­ bĆ½t delÅ”Ć­ než :value znakÅÆ.', + ], + 'max' => [ + 'array' => ':attribute nemÅÆže obsahovat vĆ­ce než :max prvkÅÆ.', + 'file' => 'Velikost souboru :attribute musĆ­ bĆ½t menÅ”Ć­ než :value kB.', + 'numeric' => ':attribute nemÅÆže bĆ½t větÅ”Ć­ než :max.', + 'string' => ':attribute nemÅÆže bĆ½t delÅ”Ć­ než :max znakÅÆ.', + ], + 'mimes' => ':attribute musĆ­ bĆ½t jeden z nĆ”sledujĆ­cĆ­ch datovĆ½ch typÅÆ :values.', + 'mimetypes' => ':attribute musĆ­ bĆ½t jeden z nĆ”sledujĆ­cĆ­ch datovĆ½ch typÅÆ :values.', + 'min' => [ + 'array' => ':attribute musĆ­ obsahovat vĆ­ce než :min prvkÅÆ.', + 'file' => ':attribute musĆ­ bĆ½t větÅ”Ć­ než :min kB.', + 'numeric' => ':attribute musĆ­ bĆ½t větÅ”Ć­ než :min.', + 'string' => ':attribute musĆ­ bĆ½t delÅ”Ć­ než :min znakÅÆ.', + ], + 'multiple_of' => ':attribute musĆ­ bĆ½t nĆ”sobkem :value', + 'not_in' => 'ZvolenĆ” hodnota pro :attribute je neplatnĆ”.', + 'not_regex' => ':attribute musĆ­ bĆ½t regulĆ”rnĆ­ vĆ½raz.', + 'numeric' => ':attribute musĆ­ bĆ½t čƭslo.', + 'password' => 'Heslo je nesprĆ”vnĆ©.', + 'present' => ':attribute musĆ­ bĆ½t vyplněno.', + 'prohibited' => 'Pole :attribute je zakĆ”zĆ”no.', + 'prohibited_if' => 'Pole :attribute je zakĆ”zĆ”no, když je :other :value.', + 'prohibited_unless' => 'Pole :attribute je zakĆ”zĆ”no, pokud nenĆ­ rok :other v roce :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => ':attribute nemĆ” sprĆ”vnĆ½ formĆ”t.', + 'relatable' => 'Tento :attribute nemusĆ­ bĆ½t spojen s tĆ­mto zdrojem.', + 'required' => ':attribute musĆ­ bĆ½t vyplněno.', + 'required_if' => ':attribute musĆ­ bĆ½t vyplněno pokud :other je :value.', + 'required_unless' => ':attribute musĆ­ bĆ½t vyplněno dokud :other je v :values.', + 'required_with' => ':attribute musĆ­ bĆ½t vyplněno pokud :values je vyplněno.', + 'required_with_all' => ':attribute musĆ­ bĆ½t vyplněno pokud :values je zvoleno.', + 'required_without' => ':attribute musĆ­ bĆ½t vyplněno pokud :values nenĆ­ vyplněno.', + 'required_without_all' => ':attribute musĆ­ bĆ½t vyplněno pokud nenĆ­ Å¾Ć”dnĆ© z :values zvoleno.', + 'same' => ':attribute a :other se musĆ­ shodovat.', + 'size' => [ + 'array' => ':attribute musĆ­ obsahovat prĆ”vě :size prvkÅÆ.', + 'file' => ':attribute musĆ­ mĆ­t přesně :size KilobytÅÆ.', + 'numeric' => ':attribute musĆ­ bĆ½t přesně :size.', + 'string' => ':attribute musĆ­ bĆ½t přesně :size znakÅÆ dlouhĆ½.', + ], + 'starts_with' => ':attribute musĆ­ začƭnat jednou z nĆ”sledujĆ­cĆ­ch hodnot: :values', + 'string' => ':attribute musĆ­ bĆ½t řetězec znakÅÆ.', + 'timezone' => ':attribute musĆ­ bĆ½t platnĆ” časovĆ” zĆ³na.', + 'unique' => ':attribute musĆ­ bĆ½t unikĆ”tnĆ­.', + 'uploaded' => 'NahrĆ”vĆ”nĆ­ :attribute se nezdařilo.', + 'url' => 'FormĆ”t :attribute je neplatnĆ½.', + 'uuid' => ':attribute musĆ­ bĆ½t validnĆ­ UUID.', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], +]; diff --git a/resources/lang/de.json b/lang/de.json similarity index 95% rename from resources/lang/de.json rename to lang/de.json index fefd73691..9107634ba 100644 --- a/resources/lang/de.json +++ b/lang/de.json @@ -81,7 +81,7 @@ "Someone registered using your Code!": "Jemand hat sich mit deinem Code registriert!", "Server Creation Error": "Fehler beim erstellen des Servers", "Your servers have been suspended!": "Deine Server wurden pausiert", - "To automatically re-enable your server\/s, you need to purchase more credits.": "Um deine Server zu reaktivieren, musst du mehr Credits kaufen!", + "To automatically re-enable your server/s, you need to purchase more credits.": "Um deine Server zu reaktivieren, musst du mehr Credits kaufen!", "Purchase credits": "Credits kaufen", "If you have any questions please let us know.": "Solltest du weiter fragen haben, melde dich gerne beim Support!", "Regards": "mit freundlichen GrĆ¼ĆŸen", @@ -93,7 +93,7 @@ "Getting started!": "Den Anfang machen!", "Welcome to our dashboard": "Willkommen in unserem Dashboard", "Verification": "Verifizierung", - "You can verify your e-mail address and link\/verify your Discord account.": "Du kannst deine Email-Adresse und deinen Discord account verifizieren.", + "You can verify your e-mail address and link/verify your Discord account.": "Du kannst deine Email-Adresse und deinen Discord account verifizieren.", "Information": "Hinweis", "This dashboard can be used to create and delete servers": "Dieses Dashboard kann benutzt werden um Server zu erstellen und zu lƶschen", "These servers can be used and managed on our pterodactyl panel": "Die Server werden von unserem Pterodactyl-Panel aus gemanaged", @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "Bitte erstellen Sie eine Datei mit dem Namen \"install.lock\" in Ihrem Dashboard-Root-Verzeichnis. Sonst werden keine Einstellungen geladen!", "or click here": "oder klicke hier", "Company Name": "Firmenname", - "Company Adress": "Firmenadresse", + "Company Address": "Firmenadresse", "Company Phonenumber": "Firmen Telefonnummer", "VAT ID": "Umsatzsteuer-ID", - "Company E-Mail Adress": "Firmen E-Mail Adresse", + "Company E-Mail Address": "Firmen E-Mail Adresse", "Company Website": "Firmenwebseite", "Invoice Prefix": "RechnungsprƤfix", "Enable Invoices": "Rechnungen aktivieren", @@ -187,7 +187,7 @@ "Default language": "Standardsprache", "The fallback Language, if something goes wrong": "Die RĆ¼ckfall-Sprache, falls etwas schief geht", "Datable language": "Tabellensprache", - "The datatables lang-code.
Example:<\/strong> en-gb, fr_fr, de_de
More Information: ": "Der Sprachcode der Tabellensprache.
Beispiel:<\/strong> en-gb, fr_fr, de_de
Weitere Informationen: ", + "The datatables lang-code.
Example: en-gb, fr_fr, de_de
More Information: ": "Der Sprachcode der Tabellensprache.
Beispiel: en-gb, fr_fr, de_de
Weitere Informationen: ", "Auto-translate": "Automatisches Ć¼bersetzen", "If this is checked, the Dashboard will translate itself to the Clients language, if available": "Wenn dies aktiviert ist, Ć¼bersetzt sich das Dashboard selbst in die Sprache des Clients, sofern diese verfĆ¼gbar ist", "Client Language-Switch": "Nutzer Sprachumschaltung", @@ -199,7 +199,7 @@ "Mail Username": "E-Mail Nutzername", "Mail Password": "E-Mail Passwort", "Mail Encryption": "E-Mail VerschlĆ¼sselungsart", - "Mail From Adress": "Absender E-Mailadresse", + "Mail From Address": "Absender E-Mailadresse", "Mail From Name": "Absender E-Mailname", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "DIscord Client-Secret", @@ -243,9 +243,9 @@ "Charges the first hour worth of credits upon creating a server.": "Rechne den ersten stĆ¼ndlichen Anteil direkt bei Erstellung des Servers ab.", "Credits Display Name": "Credits Anzeigename", "PHPMyAdmin URL": "PHPMyAdmin URL", - "Enter the URL to your PHPMyAdmin installation. Without a trailing slash!<\/strong>": "Geben Sie die URL zu Ihrer PHPMyAdmin-Installation ein. Ohne abschlieƟendendes Slash!<\/strong>", + "Enter the URL to your PHPMyAdmin installation. Without a trailing slash!": "Geben Sie die URL zu Ihrer PHPMyAdmin-Installation ein. Ohne abschlieƟendendes Slash!", "Pterodactyl URL": "Pterodactyl URL", - "Enter the URL to your Pterodactyl installation. Without a trailing slash!<\/strong>": "Geben Sie die URL zu Ihrer Pterodactyl-Installation ein. Ohne abschlieƟendendes Slash!<\/strong>", + "Enter the URL to your Pterodactyl installation. Without a trailing slash!": "Geben Sie die URL zu Ihrer Pterodactyl-Installation ein. Ohne abschlieƟendendes Slash!", "Pterodactyl API Key": "Pterodactyl API SchlĆ¼ssel", "Enter the API Key to your Pterodactyl installation.": "Geben Sie den API-SchlĆ¼ssel zu Ihrer Pterodactyl-Installation ein.", "Force Discord verification": "Discord Verifikation erzwingen", @@ -316,7 +316,7 @@ "A voucher can only be used one time per user. Uses specifies the number of different users that can use this voucher.": "Ein Gutschein kann von einem User nur einmal eingelƶst werden. \"Benutzungen\" setzt die Anzahl an Usern die diesen Gutschein einlƶsen kƶnnen.", "Max": "Max", "Expires at": "LƤuft ab am", - "Used \/ Uses": "Benutzungen", + "Used / Uses": "Benutzungen", "Expires": "Ablauf", "Sign in to start your session": "Melde dich an um das Dashboard zu benutzen", "Password": "Passwort", @@ -388,7 +388,7 @@ "No nodes have been linked!": "Es wurde keine Nodes verknĆ¼pft", "No nests available!": "Keine Nests verfĆ¼gbar", "No eggs have been linked!": "Es wurde keine Eggs verknĆ¼pft", - "Software \/ Games": "Software \/ Spiele", + "Software / Games": "Software / Spiele", "Please select software ...": "Bitte Software auswƤhlen", "---": "--", "Specification ": "Spezifikation", @@ -460,5 +460,8 @@ "tr": "TĆ¼rkisch", "ru": "Russisch", "sv": "Schwedisch", - "sk": "Slowakisch" -} \ No newline at end of file + "sk": "Slowakisch", + "Imprint": "Impressum", + "Privacy": "Datenschutz", + "Privacy Policy": "DatenschutzerklƤrung" +} diff --git a/resources/lang/de/auth.php b/lang/de/auth.php similarity index 85% rename from resources/lang/de/auth.php rename to lang/de/auth.php index 26860b5b7..25dba8797 100644 --- a/resources/lang/de/auth.php +++ b/lang/de/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Diese Kombination aus Zugangsdaten wurde nicht in unserer Datenbank gefunden.', + 'failed' => 'Diese Kombination aus Zugangsdaten wurde nicht in unserer Datenbank gefunden.', 'password' => 'Das eingegebene Passwort ist nicht korrekt.', 'throttle' => 'Zu viele Loginversuche. Versuchen Sie es bitte in :seconds Sekunden nochmal.', ]; diff --git a/resources/lang/de/pagination.php b/lang/de/pagination.php similarity index 92% rename from resources/lang/de/pagination.php rename to lang/de/pagination.php index 0fbc2a8c8..d6ef8d092 100644 --- a/resources/lang/de/pagination.php +++ b/lang/de/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Weiter »', + 'next' => 'Weiter »', 'previous' => '« ZurĆ¼ck', ]; diff --git a/resources/lang/de/passwords.php b/lang/de/passwords.php similarity index 62% rename from resources/lang/de/passwords.php rename to lang/de/passwords.php index 429ee9d97..b86e4bad8 100644 --- a/resources/lang/de/passwords.php +++ b/lang/de/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Das Passwort wurde zurĆ¼ckgesetzt!', - 'sent' => 'Passworterinnerung wurde gesendet!', + 'reset' => 'Das Passwort wurde zurĆ¼ckgesetzt!', + 'sent' => 'Passworterinnerung wurde gesendet!', 'throttled' => 'Bitte warten Sie, bevor Sie es erneut versuchen.', - 'token' => 'Der Passwort-Wiederherstellungs-SchlĆ¼ssel ist ungĆ¼ltig oder abgelaufen.', - 'user' => 'Es konnte leider kein Nutzer mit dieser E-Mail-Adresse gefunden werden.', + 'token' => 'Der Passwort-Wiederherstellungs-SchlĆ¼ssel ist ungĆ¼ltig oder abgelaufen.', + 'user' => 'Es konnte leider kein Nutzer mit dieser E-Mail-Adresse gefunden werden.', ]; diff --git a/lang/de/validation.php b/lang/de/validation.php new file mode 100644 index 000000000..ddd642164 --- /dev/null +++ b/lang/de/validation.php @@ -0,0 +1,135 @@ + ':attribute muss akzeptiert werden.', + 'accepted_if' => ':attribute muss akzeptiert werden, wenn :other :value ist.', + 'active_url' => ':attribute ist keine gĆ¼ltige Internet-Adresse.', + 'after' => ':attribute muss ein Datum nach :date sein.', + 'after_or_equal' => ':attribute muss ein Datum nach :date oder gleich :date sein.', + 'alpha' => ':attribute darf nur aus Buchstaben bestehen.', + 'alpha_dash' => ':attribute darf nur aus Buchstaben, Zahlen, Binde- und Unterstrichen bestehen.', + 'alpha_num' => ':attribute darf nur aus Buchstaben und Zahlen bestehen.', + 'array' => ':attribute muss ein Array sein.', + 'attached' => ':attribute ist bereits angehƤngt.', + 'before' => ':attribute muss ein Datum vor :date sein.', + 'before_or_equal' => ':attribute muss ein Datum vor :date oder gleich :date sein.', + 'between' => [ + 'array' => ':attribute muss zwischen :min & :max Elemente haben.', + 'file' => ':attribute muss zwischen :min & :max Kilobytes groƟ sein.', + 'numeric' => ':attribute muss zwischen :min & :max liegen.', + 'string' => ':attribute muss zwischen :min & :max Zeichen lang sein.', + ], + 'boolean' => ':attribute muss entweder \'true\' oder \'false\' sein.', + 'confirmed' => ':attribute stimmt nicht mit der BestƤtigung Ć¼berein.', + 'current_password' => 'Das Passwort ist falsch.', + 'date' => ':attribute muss ein gĆ¼ltiges Datum sein.', + 'date_equals' => ':attribute muss ein Datum gleich :date sein.', + 'date_format' => ':attribute entspricht nicht dem gĆ¼ltigen Format fĆ¼r :format.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => ':attribute und :other mĆ¼ssen sich unterscheiden.', + 'digits' => ':attribute muss :digits Stellen haben.', + 'digits_between' => ':attribute muss zwischen :min und :max Stellen haben.', + 'dimensions' => ':attribute hat ungĆ¼ltige Bildabmessungen.', + 'distinct' => ':attribute beinhaltet einen bereits vorhandenen Wert.', + 'email' => ':attribute muss eine gĆ¼ltige E-Mail-Adresse sein.', + 'ends_with' => ':attribute muss eine der folgenden Endungen aufweisen: :values', + 'exists' => 'Der gewƤhlte Wert fĆ¼r :attribute ist ungĆ¼ltig.', + 'file' => ':attribute muss eine Datei sein.', + 'filled' => ':attribute muss ausgefĆ¼llt sein.', + 'gt' => [ + 'array' => ':attribute muss mehr als :value Elemente haben.', + 'file' => ':attribute muss grĆ¶ĆŸer als :value Kilobytes sein.', + 'numeric' => ':attribute muss grĆ¶ĆŸer als :value sein.', + 'string' => ':attribute muss lƤnger als :value Zeichen sein.', + ], + 'gte' => [ + 'array' => ':attribute muss mindestens :value Elemente haben.', + 'file' => ':attribute muss grĆ¶ĆŸer oder gleich :value Kilobytes sein.', + 'numeric' => ':attribute muss grĆ¶ĆŸer oder gleich :value sein.', + 'string' => ':attribute muss mindestens :value Zeichen lang sein.', + ], + 'image' => ':attribute muss ein Bild sein.', + 'in' => 'Der gewƤhlte Wert fĆ¼r :attribute ist ungĆ¼ltig.', + 'in_array' => 'Der gewƤhlte Wert fĆ¼r :attribute kommt nicht in :other vor.', + 'integer' => ':attribute muss eine ganze Zahl sein.', + 'ip' => ':attribute muss eine gĆ¼ltige IP-Adresse sein.', + 'ipv4' => ':attribute muss eine gĆ¼ltige IPv4-Adresse sein.', + 'ipv6' => ':attribute muss eine gĆ¼ltige IPv6-Adresse sein.', + 'json' => ':attribute muss ein gĆ¼ltiger JSON-String sein.', + 'lt' => [ + 'array' => ':attribute muss weniger als :value Elemente haben.', + 'file' => ':attribute muss kleiner als :value Kilobytes sein.', + 'numeric' => ':attribute muss kleiner als :value sein.', + 'string' => ':attribute muss kĆ¼rzer als :value Zeichen sein.', + ], + 'lte' => [ + 'array' => ':attribute darf maximal :value Elemente haben.', + 'file' => ':attribute muss kleiner oder gleich :value Kilobytes sein.', + 'numeric' => ':attribute muss kleiner oder gleich :value sein.', + 'string' => ':attribute darf maximal :value Zeichen lang sein.', + ], + 'max' => [ + 'array' => ':attribute darf maximal :max Elemente haben.', + 'file' => ':attribute darf maximal :max Kilobytes groƟ sein.', + 'numeric' => ':attribute darf maximal :max sein.', + 'string' => ':attribute darf maximal :max Zeichen haben.', + ], + 'mimes' => ':attribute muss den Dateityp :values haben.', + 'mimetypes' => ':attribute muss den Dateityp :values haben.', + 'min' => [ + 'array' => ':attribute muss mindestens :min Elemente haben.', + 'file' => ':attribute muss mindestens :min Kilobytes groƟ sein.', + 'numeric' => ':attribute muss mindestens :min sein.', + 'string' => ':attribute muss mindestens :min Zeichen lang sein.', + ], + 'multiple_of' => ':attribute muss ein Vielfaches von :value sein.', + 'not_in' => 'Der gewƤhlte Wert fĆ¼r :attribute ist ungĆ¼ltig.', + 'not_regex' => ':attribute hat ein ungĆ¼ltiges Format.', + 'numeric' => ':attribute muss eine Zahl sein.', + 'password' => 'Das Passwort ist falsch.', + 'present' => ':attribute muss vorhanden sein.', + 'prohibited' => ':attribute ist unzulƤssig.', + 'prohibited_if' => ':attribute ist unzulƤssig, wenn :other :value ist.', + 'prohibited_unless' => ':attribute ist unzulƤssig, wenn :other nicht :values ist.', + 'prohibits' => ':attribute verbietet die Angabe von :other.', + 'regex' => ':attribute Format ist ungĆ¼ltig.', + 'relatable' => ':attribute kann nicht mit dieser Ressource verbunden werden.', + 'required' => ':attribute muss ausgefĆ¼llt werden.', + 'required_if' => ':attribute muss ausgefĆ¼llt werden, wenn :other den Wert :value hat.', + 'required_unless' => ':attribute muss ausgefĆ¼llt werden, wenn :other nicht den Wert :values hat.', + 'required_with' => ':attribute muss ausgefĆ¼llt werden, wenn :values ausgefĆ¼llt wurde.', + 'required_with_all' => ':attribute muss ausgefĆ¼llt werden, wenn :values ausgefĆ¼llt wurde.', + 'required_without' => ':attribute muss ausgefĆ¼llt werden, wenn :values nicht ausgefĆ¼llt wurde.', + 'required_without_all' => ':attribute muss ausgefĆ¼llt werden, wenn keines der Felder :values ausgefĆ¼llt wurde.', + 'same' => ':attribute und :other mĆ¼ssen Ć¼bereinstimmen.', + 'size' => [ + 'array' => ':attribute muss genau :size Elemente haben.', + 'file' => ':attribute muss :size Kilobyte groƟ sein.', + 'numeric' => ':attribute muss gleich :size sein.', + 'string' => ':attribute muss :size Zeichen lang sein.', + ], + 'starts_with' => ':attribute muss mit einem der folgenden AnfƤnge aufweisen: :values', + 'string' => ':attribute muss ein String sein.', + 'timezone' => ':attribute muss eine gĆ¼ltige Zeitzone sein.', + 'unique' => ':attribute ist bereits vergeben.', + 'uploaded' => ':attribute konnte nicht hochgeladen werden.', + 'url' => ':attribute muss eine URL sein.', + 'uuid' => ':attribute muss ein UUID sein.', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], +]; diff --git a/resources/lang/en.json b/lang/en.json similarity index 74% rename from resources/lang/en.json rename to lang/en.json index 2aa72dbc7..c0aa64314 100644 --- a/resources/lang/en.json +++ b/lang/en.json @@ -10,6 +10,10 @@ "Everything is good!": "Everything is good!", "System settings have not been updated!": "System settings have not been updated!", "System settings updated!": "System settings updated!", + "Discount": "Discount", + "The product you chose can't be purchased with this payment method. The total amount is too small. Please buy a bigger amount or try a different payment method.": "The product you chose can't be purchased with this payment method. The total amount is too small. Please buy a bigger amount or try a different payment method.", + "Tax": "Tax", + "Your payment has been canceled!": "Your payment has been canceled!", "api key created!": "api key created!", "api key updated!": "api key updated!", "api key has been removed!": "api key has been removed!", @@ -20,11 +24,9 @@ "Invoice does not exist on filesystem!": "Invoice does not exist on filesystem!", "unknown": "unknown", "Pterodactyl synced": "Pterodactyl synced", + "An error ocured. Please try again.": "An error ocured. Please try again.", "Your credit balance has been increased!": "Your credit balance has been increased!", - "Your payment is being processed!": "Your payment is being processed!", - "Your payment has been canceled!": "Your payment has been canceled!", - "Payment method": "Payment method", - "Invoice": "Invoice", + "Unknown user": "Unknown user", "Download": "Download", "Product has been created!": "Product has been created!", "Product has been updated!": "Product has been updated!", @@ -34,6 +36,10 @@ "Server removed": "Server removed", "An exception has occurred while trying to remove a resource \"": "An exception has occurred while trying to remove a resource \"", "Server has been updated!": "Server has been updated!", + "renamed": "renamed", + "servers": "servers", + "deleted": "deleted", + "old servers": "old servers", "Unsuspend": "Unsuspend", "Suspend": "Suspend", "Store item has been created!": "Store item has been created!", @@ -69,10 +75,15 @@ "Close": "Close", "Target User already in blacklist. Reason updated": "Target User already in blacklist. Reason updated", "Change Status": "Change Status", + "partner has been created!": "partner has been created!", + "partner has been updated!": "partner has been updated!", + "partner has been removed!": "partner has been removed!", + "Default": "Default", + "Account permanently deleted!": "Account permanently deleted!", "Profile updated": "Profile updated", "Server limit reached!": "Server limit reached!", - "The node '\" . $nodeName . \"' doesn't have the required memory or disk left to allocate this product.": "The node '\" . $nodeName . \"' doesn't have the required memory or disk left to allocate this product.", "You are required to verify your email address before you can create a server.": "You are required to verify your email address before you can create a server.", + "The system administrator has blocked the creation of new servers.": "The system administrator has blocked the creation of new servers.", "You are required to link your discord account before you can create a server.": "You are required to link your discord account before you can create a server.", "Server created": "Server created", "No allocations satisfying the requirements for automatic deployment on this node were found.": "No allocations satisfying the requirements for automatic deployment on this node were found.", @@ -82,9 +93,7 @@ "Not Enough Balance for Upgrade": "Not Enough Balance for Upgrade", "You are required to verify your email address before you can purchase credits.": "You are required to verify your email address before you can purchase credits.", "You are required to link your discord account before you can purchase Credits": "You are required to link your discord account before you can purchase Credits", - "You can't make a ticket because you're on the blacklist for a reason: '\" . $check->reason . \"": "You can't make a ticket because you're on the blacklist for a reason: '\" . $check->reason . \"", "A ticket has been opened, ID: #": "A ticket has been opened, ID: #", - "You can't reply a ticket because you're on the blacklist for a reason: '\" . $check->reason . \"": "You can't reply a ticket because you're on the blacklist for a reason: '\" . $check->reason . \"", "EXPIRED": "EXPIRED", "Payment Confirmation": "Payment Confirmation", "Payment Confirmed!": "Payment Confirmed!", @@ -118,6 +127,8 @@ "These servers can be used and managed on our pterodactyl panel": "These servers can be used and managed on our pterodactyl panel", "If you have any questions, please join our Discord server and #create-a-ticket": "If you have any questions, please join our Discord server and #create-a-ticket", "We hope you can enjoy this hosting experience and if you have any suggestions please let us know": "We hope you can enjoy this hosting experience and if you have any suggestions please let us know", + "Payment method": "Payment method", + "Invoice": "Invoice", "Activity Logs": "Activity Logs", "Dashboard": "Dashboard", "No recent activity from cronjobs": "No recent activity from cronjobs", @@ -142,6 +153,10 @@ "Nodes": "Nodes", "Location": "Location", "Admin Overview": "Admin Overview", + "Version Outdated:": "Version Outdated:", + "You are running on": "You are running on", + "The latest Version is": "The latest Version is", + "Consider updating now": "Consider updating now", "Support server": "Support server", "Documentation": "Documentation", "Github": "Github", @@ -150,11 +165,59 @@ "Total": "Total", "Payments": "Payments", "Pterodactyl": "Pterodactyl", + "Warning!": "Warning!", + "Some nodes got deleted on pterodactyl only. Please click the sync button above.": "Some nodes got deleted on pterodactyl only. Please click the sync button above.", "Resources": "Resources", "Count": "Count", "Locations": "Locations", "Eggs": "Eggs", "Last updated :date": "Last updated :date", + "Latest tickets": "Latest tickets", + "There are no tickets": "There are no tickets", + "Title": "Title", + "User": "User", + "Last updated": "Last updated", + "Controlpanel.gg": "Controlpanel.gg", + "Version": "Version", + "Individual nodes": "Individual nodes", + "You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.": "You reached the Pterodactyl perPage limit. Please make sure to set it higher than your server count.", + "You can do that in settings.": "You can do that in settings.", + "Note": "Note", + "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.": "If this error persists even after changing the limit, it might mean a server was deleted on Pterodactyl, but not on ControlPanel. Try clicking the button below.", + "Sync servers": "Sync servers", + "Node": "Node", + "Server count": "Server count", + "Resource usage": "Resource usage", + "Usage": "Usage", + "active": "active", + "total": "total", + "Latest payments": "Latest payments", + "Last month": "Last month", + "Payments in this time window": "Payments in this time window", + "Currency": "Currency", + "Number of payments": "Number of payments", + "Total amount": "Total amount", + "This month": "This month", + "Tax overview": "Tax overview", + "Last year": "Last year", + "Base amount": "Base amount", + "Total taxes": "Total taxes", + "This year": "This year", + "Vouchers": "Vouchers", + "Partner details": "Partner details", + "Partner discount": "Partner discount", + "The discount in percent given to the partner when purchasing credits.": "The discount in percent given to the partner when purchasing credits.", + "Discount in percent": "Discount in percent", + "Registered user discount": "Registered user discount", + "The discount in percent given to all users registered using the partners referral link when purchasing credits.": "The discount in percent given to all users registered using the partners referral link when purchasing credits.", + "Referral system commission": "Referral system commission", + "Override value for referral system commission. You can set it to -1 to get the default commission from settings.": "Override value for referral system commission. You can set it to -1 to get the default commission from settings.", + "Commission in percent": "Commission in percent", + "Partners": "Partners", + "The discount in percent given to the partner at checkout.": "The discount in percent given to the partner at checkout.", + "The discount in percent given to all users registered using the partners referral link.": "The discount in percent given to all users registered using the partners referral link.", + "Created": "Created", + "Actions": "Actions", "Download all Invoices": "Download all Invoices", "Product Price": "Product Price", "Tax Value": "Tax Value", @@ -182,6 +245,9 @@ "Link your products to nodes and eggs to create dynamic pricing for each option": "Link your products to nodes and eggs to create dynamic pricing for each option", "This product will only be available for these nodes": "This product will only be available for these nodes", "This product will only be available for these eggs": "This product will only be available for these eggs", + "No Eggs or Nodes shown?": "No Eggs or Nodes shown?", + "Sync now": "Sync now", + "Min Credits": "Min Credits", "Product": "Product", "CPU": "CPU", "Updated at": "Updated at", @@ -190,7 +256,9 @@ "You usually do not need to change anything here": "You usually do not need to change anything here", "Edit Server": "Edit Server", "Server identifier": "Server identifier", - "User": "User", + "Change the server identifier on controlpanel to match a pterodactyl server.": "Change the server identifier on controlpanel to match a pterodactyl server.", + "Server owner": "Server owner", + "Change the current server owner on controlpanel and pterodactyl.": "Change the current server owner on controlpanel and pterodactyl.", "Server id": "Server id", "Config": "Config", "Suspended at": "Suspended at", @@ -199,10 +267,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!", "or click here": "or click here", "Company Name": "Company Name", - "Company Adress": "Company Adress", + "Company Address": "Company Address", "Company Phonenumber": "Company Phonenumber", "VAT ID": "VAT ID", - "Company E-Mail Adress": "Company E-Mail Adress", + "Company E-Mail Address": "Company E-Mail Address", "Company Website": "Company Website", "Invoice Prefix": "Invoice Prefix", "Enable Invoices": "Enable Invoices", @@ -224,7 +292,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -235,7 +303,11 @@ "Enable ReCaptcha": "Enable ReCaptcha", "ReCaptcha Site-Key": "ReCaptcha Site-Key", "ReCaptcha Secret-Key": "ReCaptcha Secret-Key", + "Your Recaptcha": "Your Recaptcha", + "Referral System": "Referral System", "Enable Referral": "Enable Referral", + "Always give commission": "Always give commission", + "Should users recieve the commission only for the first payment, or for every payment?": "Should users recieve the commission only for the first payment, or for every payment?", "Mode": "Mode", "Should a reward be given if a new User registers or if a new user buys credits": "Should a reward be given if a new User registers or if a new user buys credits", "Commission": "Commission", @@ -251,6 +323,10 @@ "Everyone": "Everyone", "Clients": "Clients", "Enable Ticketsystem": "Enable Ticketsystem", + "Notify on Ticket creation": "Notify on Ticket creation", + "Who will receive an E-Mail when a new Ticket is created": "Who will receive an E-Mail when a new Ticket is created", + "Admins": "Admins", + "Moderators": "Moderators", "PayPal Client-ID": "PayPal Client-ID", "PayPal Secret-Key": "PayPal Secret-Key", "PayPal Sandbox Client-ID": "PayPal Sandbox Client-ID", @@ -263,6 +339,9 @@ "Payment Methods": "Payment Methods", "Tax Value in %": "Tax Value in %", "System": "System", + "Show Terms of Service": "Show Terms of Service", + "Show Imprint": "Show Imprint", + "Show Privacy Policy": "Show Privacy Policy", "Register IP Check": "Register IP Check", "Prevent users from making multiple accounts using the same IP address.": "Prevent users from making multiple accounts using the same IP address.", "Charge first hour at creation": "Charge first hour at creation", @@ -272,6 +351,8 @@ "Enter the URL to your PHPMyAdmin installation. Without a trailing slash!<\/strong>": "Enter the URL to your PHPMyAdmin installation. Without a trailing slash!<\/strong>", "Pterodactyl URL": "Pterodactyl URL", "Enter the URL to your Pterodactyl installation. Without a trailing slash!<\/strong>": "Enter the URL to your Pterodactyl installation. Without a trailing slash!<\/strong>", + "Pterodactyl API perPage limit": "Pterodactyl API perPage limit", + "The Pterodactyl API perPage limit. It is necessary to set it higher than your server count.": "The Pterodactyl API perPage limit. It is necessary to set it higher than your server count.", "Pterodactyl API Key": "Pterodactyl API Key", "Enter the API Key to your Pterodactyl installation.": "Enter the API Key to your Pterodactyl installation.", "Pterodactyl Admin-Account API Key": "Pterodactyl Admin-Account API Key", @@ -279,6 +360,8 @@ "Test API": "Test API", "Force Discord verification": "Force Discord verification", "Force E-Mail verification": "Force E-Mail verification", + "Creation of new users": "Creation of new users", + "If unchecked, it will disable the registration of new users in the system, and this will also apply to the API.": "If unchecked, it will disable the registration of new users in the system, and this will also apply to the API.", "Initial Credits": "Initial Credits", "Initial Server Limit": "Initial Server Limit", "Credits Reward Amount - Discord": "Credits Reward Amount - Discord", @@ -287,13 +370,38 @@ "Server Limit Increase - E-Mail": "Server Limit Increase - E-Mail", "Server Limit after Credits Purchase": "Server Limit after Credits Purchase", "Server": "Server", + "Enable upgrade\/downgrade of servers": "Enable upgrade\/downgrade of servers", + "Allow upgrade\/downgrade to a new product for the given server": "Allow upgrade\/downgrade to a new product for the given server", + "Creation of new servers": "Creation of new servers", + "If unchecked, it will disable the creation of new servers for regular users and system moderators, this has no effect for administrators.": "If unchecked, it will disable the creation of new servers for regular users and system moderators, this has no effect for administrators.", "Server Allocation Limit": "Server Allocation Limit", "The maximum amount of allocations to pull per node for automatic deployment, if more allocations are being used than this limit is set to, no new servers can be created!": "The maximum amount of allocations to pull per node for automatic deployment, if more allocations are being used than this limit is set to, no new servers can be created!", + "Minimum credits": "Minimum credits", + "The minimum amount of credits user has to have to create a server. Can be overridden by package limits.": "The minimum amount of credits user has to have to create a server. Can be overridden by package limits.", + "SEO": "SEO", + "SEO Title": "SEO Title", + "An SEO title tag must contain your target keyword. This tells both Google and searchers that your web page is relevant to this search query!": "An SEO title tag must contain your target keyword. This tells both Google and searchers that your web page is relevant to this search query!", + "SEO Description": "SEO Description", + "The SEO site description represents your homepage. Search engines show this description in search results for your homepage if they dont find content more relevant to a visitors search terms.": "The SEO site description represents your homepage. Search engines show this description in search results for your homepage if they dont find content more relevant to a visitors search terms.", "Design": "Design", + "Theme": "Theme", "Enable Logo on Loginpage": "Enable Logo on Loginpage", "Select panel icon": "Select panel icon", "Select Login-page Logo": "Select Login-page Logo", "Select panel favicon": "Select panel favicon", + "Enable the Alert Message on Homepage": "Enable the Alert Message on Homepage", + "Alert Color": "Alert Color", + "Blue": "Blue", + "Grey": "Grey", + "Green": "Green", + "Red": "Red", + "Orange": "Orange", + "Cyan": "Cyan", + "Alert Message (HTML might be used)": "Alert Message (HTML might be used)", + "Message of the day": "Message of the day", + "Enable the MOTD on the Homepage": "Enable the MOTD on the Homepage", + "Enable the Useful-Links section": "Enable the Useful-Links section", + "MOTD-Text": "MOTD-Text", "Store": "Store", "Server Slots": "Server Slots", "Currency code": "Currency code", @@ -309,7 +417,6 @@ "Useful Links": "Useful Links", "Icon class name": "Icon class name", "You can find available free icons": "You can find available free icons", - "Title": "Title", "Link": "Link", "description": "description", "Icon": "Icon", @@ -339,11 +446,9 @@ "Content": "Content", "Server limit": "Server limit", "Discord": "Discord", - "Usage": "Usage", "IP": "IP", "Referals": "Referals", "referral-code": "referral-code", - "Vouchers": "Vouchers", "Voucher details": "Voucher details", "Summer break voucher": "Summer break voucher", "Code": "Code", @@ -355,11 +460,15 @@ "Used \/ Uses": "Used \/ Uses", "Expires": "Expires", "Sign in to start your session": "Sign in to start your session", + "Email or Username": "Email or Username", "Password": "Password", "Remember Me": "Remember Me", "Sign In": "Sign In", "Forgot Your Password?": "Forgot Your Password?", "Register a new membership": "Register a new membership", + "Imprint": "Imprint", + "Privacy": "Privacy", + "Terms of Service": "Terms of Service", "Please confirm your password before continuing.": "Please confirm your password before continuing.", "You forgot your password? Here you can easily retrieve a new password.": "You forgot your password? Here you can easily retrieve a new password.", "Request new password": "Request new password", @@ -367,7 +476,10 @@ "You are only one step a way from your new password, recover your password now.": "You are only one step a way from your new password, recover your password now.", "Retype password": "Retype password", "Change password": "Change password", + "The system administrator has blocked the registration of new users": "The system administrator has blocked the registration of new users", + "Back": "Back", "Referral code": "Referral code", + "I agree to the": "I agree to the", "Register": "Register", "I already have a membership": "I already have a membership", "Verify Your Email Address": "Verify Your Email Address", @@ -377,6 +489,17 @@ "click here to request another": "click here to request another", "per month": "per month", "Out of Credits in": "Out of Credits in", + "Partner program": "Partner program", + "Your referral URL": "Your referral URL", + "Click to copy": "Click to copy", + "Number of referred users:": "Number of referred users:", + "Your discount": "Your discount", + "Discount for your new users": "Discount for your new users", + "Reward per registered user": "Reward per registered user", + "New user payment commision": "New user payment commision", + "Make a purchase to reveal your referral-URL": "Make a purchase to reveal your referral-URL", + "URL copied to clipboard": "URL copied to clipboard", + "Privacy Policy": "Privacy Policy", "Home": "Home", "Language": "Language", "See all Notifications": "See all Notifications", @@ -394,7 +517,6 @@ "Management": "Management", "Other": "Other", "Logs": "Logs", - "Warning!": "Warning!", "You have not yet verified your email address": "You have not yet verified your email address", "Click here to resend verification email": "Click here to resend verification email", "Please contact support If you didnt receive your verification email.": "Please contact support If you didnt receive your verification email.", @@ -406,12 +528,12 @@ "Blacklist List": "Blacklist List", "Reason": "Reason", "Created At": "Created At", - "Actions": "Actions", "Add To Blacklist": "Add To Blacklist", "please make the best of it": "please make the best of it", "Please note, the blacklist will make the user unable to make a ticket\/reply again": "Please note, the blacklist will make the user unable to make a ticket\/reply again", "Ticket": "Ticket", "Category": "Category", + "Priority": "Priority", "Last Updated": "Last Updated", "Comment": "Comment", "All notifications": "All notifications", @@ -422,6 +544,7 @@ "Please contact support If you face any issues.": "Please contact support If you face any issues.", "Due to system settings you are required to verify your discord account!": "Due to system settings you are required to verify your discord account!", "It looks like this hasnt been set-up correctly! Please contact support.": "It looks like this hasnt been set-up correctly! Please contact support.", + "Permanently delete my account": "Permanently delete my account", "Change Password": "Change Password", "Current Password": "Current Password", "Link your discord account!": "Link your discord account!", @@ -430,11 +553,14 @@ "You are verified!": "You are verified!", "Re-Sync Discord": "Re-Sync Discord", "Save Changes": "Save Changes", - "URL copied to clipboard": "URL copied to clipboard", + "Are you sure you want to permanently delete your account and all of your servers?": "Are you sure you want to permanently delete your account and all of your servers?", + "Delete my account": "Delete my account", + "Account has been destroyed": "Account has been destroyed", + "Account was NOT deleted.": "Account was NOT deleted.", "Server configuration": "Server configuration", + "here": "here", "Make sure to link your products to nodes and eggs.": "Make sure to link your products to nodes and eggs.", "There has to be at least 1 valid product for server creation": "There has to be at least 1 valid product for server creation", - "Sync now": "Sync now", "No products available!": "No products available!", "No nodes have been linked!": "No nodes have been linked!", "No nests available!": "No nests available!", @@ -443,12 +569,14 @@ "Please select software ...": "Please select software ...", "---": "---", "Specification ": "Specification ", - "Node": "Node", "Resource Data:": "Resource Data:", "vCores": "vCores", "MB": "MB", "MySQL": "MySQL", "ports": "ports", + "Required": "Required", + "to create this server": "to create this server", + "Server cant fit on this Node": "Server cant fit on this Node", "Not enough": "Not enough", "Create server": "Create server", "Please select a node ...": "Please select a node ...", @@ -472,20 +600,20 @@ "Hourly Price": "Hourly Price", "Monthly Price": "Monthly Price", "MySQL Database": "MySQL Database", - "To enable the upgrade\/downgrade system, please set your Ptero Admin-User API Key in the Settings!": "To enable the upgrade\/downgrade system, please set your Ptero Admin-User API Key in the Settings!", "Upgrade \/ Downgrade": "Upgrade \/ Downgrade", "Upgrade\/Downgrade Server": "Upgrade\/Downgrade Server", "FOR DOWNGRADE PLEASE CHOOSE A PLAN BELOW YOUR PLAN": "FOR DOWNGRADE PLEASE CHOOSE A PLAN BELOW YOUR PLAN", "YOUR PRODUCT": "YOUR PRODUCT", "Select the product": "Select the product", + "Server canĀ“t fit on this node": "Server canĀ“t fit on this node", "Once the Upgrade button is pressed, we will automatically deduct the amount for the first hour according to the new product from your credits": "Once the Upgrade button is pressed, we will automatically deduct the amount for the first hour according to the new product from your credits", + "Server will be automatically restarted once upgraded": "Server will be automatically restarted once upgraded", "Change Product": "Change Product", "Delete Server": "Delete Server", "This is an irreversible action, all files of this server will be removed!": "This is an irreversible action, all files of this server will be removed!", "Date": "Date", "Subtotal": "Subtotal", "Amount Due": "Amount Due", - "Tax": "Tax", "Submit Payment": "Submit Payment", "Purchase": "Purchase", "There are no store products!": "There are no store products!", @@ -504,13 +632,10 @@ "VAT Code": "VAT Code", "Phone": "Phone", "Units": "Units", - "Discount": "Discount", "Total discount": "Total discount", "Taxable amount": "Taxable amount", "Tax rate": "Tax rate", - "Total taxes": "Total taxes", "Shipping": "Shipping", - "Total amount": "Total amount", "Notes": "Notes", "Amount in words": "Amount in words", "Please pay until": "Please pay until", diff --git a/resources/lang/en/auth.php b/lang/en/auth.php similarity index 100% rename from resources/lang/en/auth.php rename to lang/en/auth.php diff --git a/resources/lang/en/pagination.php b/lang/en/pagination.php similarity index 100% rename from resources/lang/en/pagination.php rename to lang/en/pagination.php diff --git a/resources/lang/en/passwords.php b/lang/en/passwords.php similarity index 100% rename from resources/lang/en/passwords.php rename to lang/en/passwords.php diff --git a/resources/lang/en/validation.php b/lang/en/validation.php similarity index 70% rename from resources/lang/en/validation.php rename to lang/en/validation.php index c77e41ce4..af94bd426 100644 --- a/resources/lang/en/validation.php +++ b/lang/en/validation.php @@ -14,47 +14,56 @@ */ 'accepted' => 'The :attribute must be accepted.', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'alpha' => 'The :attribute must only contain letters.', + 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.', + 'alpha_num' => 'The :attribute must only contain letters and numbers.', 'array' => 'The :attribute must be an array.', + 'ascii' => 'The :attribute must only contain single-byte alphanumeric characters and symbols.', 'before' => 'The :attribute must be a date before :date.', 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', 'between' => [ - 'numeric' => 'The :attribute must be between :min and :max.', + 'array' => 'The :attribute must have between :min and :max items.', 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'numeric' => 'The :attribute must be between :min and :max.', 'string' => 'The :attribute must be between :min and :max characters.', - 'array' => 'The :attribute must have between :min and :max items.', ], 'boolean' => 'The :attribute field must be true or false.', 'confirmed' => 'The :attribute confirmation does not match.', + 'current_password' => 'The password is incorrect.', 'date' => 'The :attribute is not a valid date.', 'date_equals' => 'The :attribute must be a date equal to :date.', 'date_format' => 'The :attribute does not match the format :format.', + 'decimal' => 'The :attribute must have :decimal decimal places.', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', 'different' => 'The :attribute and :other must be different.', 'digits' => 'The :attribute must be :digits digits.', 'digits_between' => 'The :attribute must be between :min and :max digits.', 'dimensions' => 'The :attribute has invalid image dimensions.', 'distinct' => 'The :attribute field has a duplicate value.', + 'doesnt_end_with' => 'The :attribute may not end with one of the following: :values.', + 'doesnt_start_with' => 'The :attribute may not start with one of the following: :values.', 'email' => 'The :attribute must be a valid email address.', 'ends_with' => 'The :attribute must end with one of the following: :values.', + 'enum' => 'The selected :attribute is invalid.', 'exists' => 'The selected :attribute is invalid.', 'file' => 'The :attribute must be a file.', 'filled' => 'The :attribute field must have a value.', 'gt' => [ - 'numeric' => 'The :attribute must be greater than :value.', + 'array' => 'The :attribute must have more than :value items.', 'file' => 'The :attribute must be greater than :value kilobytes.', + 'numeric' => 'The :attribute must be greater than :value.', 'string' => 'The :attribute must be greater than :value characters.', - 'array' => 'The :attribute must have more than :value items.', ], 'gte' => [ - 'numeric' => 'The :attribute must be greater than or equal :value.', - 'file' => 'The :attribute must be greater than or equal :value kilobytes.', - 'string' => 'The :attribute must be greater than or equal :value characters.', 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal to :value.', + 'string' => 'The :attribute must be greater than or equal to :value characters.', ], 'image' => 'The :attribute must be an image.', 'in' => 'The selected :attribute is invalid.', @@ -64,41 +73,57 @@ 'ipv4' => 'The :attribute must be a valid IPv4 address.', 'ipv6' => 'The :attribute must be a valid IPv6 address.', 'json' => 'The :attribute must be a valid JSON string.', + 'lowercase' => 'The :attribute must be lowercase.', 'lt' => [ - 'numeric' => 'The :attribute must be less than :value.', + 'array' => 'The :attribute must have less than :value items.', 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', 'string' => 'The :attribute must be less than :value characters.', - 'array' => 'The :attribute must have less than :value items.', ], 'lte' => [ - 'numeric' => 'The :attribute must be less than or equal :value.', - 'file' => 'The :attribute must be less than or equal :value kilobytes.', - 'string' => 'The :attribute must be less than or equal :value characters.', 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal to :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal to :value.', + 'string' => 'The :attribute must be less than or equal to :value characters.', ], + 'mac_address' => 'The :attribute must be a valid MAC address.', 'max' => [ - 'numeric' => 'The :attribute may not be greater than :max.', - 'file' => 'The :attribute may not be greater than :max kilobytes.', - 'string' => 'The :attribute may not be greater than :max characters.', - 'array' => 'The :attribute may not have more than :max items.', + 'array' => 'The :attribute must not have more than :max items.', + 'file' => 'The :attribute must not be greater than :max kilobytes.', + 'numeric' => 'The :attribute must not be greater than :max.', + 'string' => 'The :attribute must not be greater than :max characters.', ], + 'max_digits' => 'The :attribute must not have more than :max digits.', 'mimes' => 'The :attribute must be a file of type: :values.', 'mimetypes' => 'The :attribute must be a file of type: :values.', 'min' => [ - 'numeric' => 'The :attribute must be at least :min.', + 'array' => 'The :attribute must have at least :min items.', 'file' => 'The :attribute must be at least :min kilobytes.', + 'numeric' => 'The :attribute must be at least :min.', 'string' => 'The :attribute must be at least :min characters.', - 'array' => 'The :attribute must have at least :min items.', ], + 'min_digits' => 'The :attribute must have at least :min digits.', 'multiple_of' => 'The :attribute must be a multiple of :value.', 'not_in' => 'The selected :attribute is invalid.', 'not_regex' => 'The :attribute format is invalid.', 'numeric' => 'The :attribute must be a number.', - 'password' => 'The password is incorrect.', + 'password' => [ + 'letters' => 'The :attribute must contain at least one letter.', + 'mixed' => 'The :attribute must contain at least one uppercase and one lowercase letter.', + 'numbers' => 'The :attribute must contain at least one number.', + 'symbols' => 'The :attribute must contain at least one symbol.', + 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.', + ], 'present' => 'The :attribute field must be present.', + 'prohibited' => 'The :attribute field is prohibited.', + 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.', + 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.', + 'prohibits' => 'The :attribute field prohibits :other from being present.', 'regex' => 'The :attribute format is invalid.', 'required' => 'The :attribute field is required.', + 'required_array_keys' => 'The :attribute field must contain entries for: :values.', 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_if_accepted' => 'The :attribute field is required when :other is accepted.', 'required_unless' => 'The :attribute field is required unless :other is in :values.', 'required_with' => 'The :attribute field is required when :values is present.', 'required_with_all' => 'The :attribute field is required when :values are present.', @@ -106,17 +131,19 @@ 'required_without_all' => 'The :attribute field is required when none of :values are present.', 'same' => 'The :attribute and :other must match.', 'size' => [ - 'numeric' => 'The :attribute must be :size.', + 'array' => 'The :attribute must contain :size items.', 'file' => 'The :attribute must be :size kilobytes.', + 'numeric' => 'The :attribute must be :size.', 'string' => 'The :attribute must be :size characters.', - 'array' => 'The :attribute must contain :size items.', ], 'starts_with' => 'The :attribute must start with one of the following: :values.', 'string' => 'The :attribute must be a string.', - 'timezone' => 'The :attribute must be a valid zone.', + 'timezone' => 'The :attribute must be a valid timezone.', 'unique' => 'The :attribute has already been taken.', 'uploaded' => 'The :attribute failed to upload.', - 'url' => 'The :attribute format is invalid.', + 'uppercase' => 'The :attribute must be uppercase.', + 'url' => 'The :attribute must be a valid URL.', + 'ulid' => 'The :attribute must be a valid ULID.', 'uuid' => 'The :attribute must be a valid UUID.', /* diff --git a/resources/lang/es.json b/lang/es.json similarity index 99% rename from resources/lang/es.json rename to lang/es.json index af47f9bc3..400a46f49 100644 --- a/resources/lang/es.json +++ b/lang/es.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "cree un archivo llamado \"install.lock\" en el directorio RaĆ­z de su tablero. Ā”De lo contrario, no se cargarĆ” ninguna configuraciĆ³n!", "or click here": "o haga clic aquĆ­", "Company Name": "Nombre Empresa", - "Company Adress": "DirecciĆ³n de la Empresa", + "Company Address": "DirecciĆ³n de la Empresa", "Company Phonenumber": "NĆŗmero de telĆ©fono de la empresa", "VAT ID": "ID de IVA", - "Company E-Mail Adress": "DirecciĆ³n de correo electrĆ³nico de la empresa", + "Company E-Mail Address": "DirecciĆ³n de correo electrĆ³nico de la empresa", "Company Website": "PĆ”gina Web de la empresa", "Invoice Prefix": "Prefijo de factura", "Enable Invoices": "Habilitar facturas", @@ -199,7 +199,7 @@ "Mail Username": "Nombre de usuario del correo", "Mail Password": "ContraseƱa de correo", "Mail Encryption": "Cifrado de correo", - "Mail From Adress": "DirecciĆ³n del correo", + "Mail From Address": "DirecciĆ³n del correo", "Mail From Name": "Nombre del correo", "Discord Client-ID": "Discord ID-Cliente", "Discord Client-Secret": "Discord Secreto-Cliente", @@ -461,4 +461,4 @@ "ru": "Ruso", "sv": "Sueco", "sk": "Eslovaco" -} \ No newline at end of file +} diff --git a/resources/lang/es/auth.php b/lang/es/auth.php similarity index 88% rename from resources/lang/es/auth.php rename to lang/es/auth.php index b84524757..08f81942a 100644 --- a/resources/lang/es/auth.php +++ b/lang/es/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Estas credenciales no coinciden con nuestros registros.', + 'failed' => 'Estas credenciales no coinciden con nuestros registros.', 'password' => 'La contraseƱa ingresada no es correcta.', 'throttle' => 'Demasiados intentos de acceso. Por favor intente nuevamente en :seconds segundos.', ]; diff --git a/resources/lang/es/pagination.php b/lang/es/pagination.php similarity index 92% rename from resources/lang/es/pagination.php rename to lang/es/pagination.php index d8f0d1940..7fda4d4ac 100644 --- a/resources/lang/es/pagination.php +++ b/lang/es/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Siguiente »', + 'next' => 'Siguiente »', 'previous' => '« Anterior', ]; diff --git a/resources/lang/es/passwords.php b/lang/es/passwords.php similarity index 59% rename from resources/lang/es/passwords.php rename to lang/es/passwords.php index 7745e6465..2d80b4ac2 100644 --- a/resources/lang/es/passwords.php +++ b/lang/es/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Ā”Su contraseƱa ha sido restablecida!', - 'sent' => 'Ā”Le hemos enviado por correo electrĆ³nico el enlace para restablecer su contraseƱa!', + 'reset' => 'Ā”Su contraseƱa ha sido restablecida!', + 'sent' => 'Ā”Le hemos enviado por correo electrĆ³nico el enlace para restablecer su contraseƱa!', 'throttled' => 'Por favor espere antes de intentar de nuevo.', - 'token' => 'El token de restablecimiento de contraseƱa es invĆ”lido.', - 'user' => 'No encontramos ningĆŗn usuario con ese correo electrĆ³nico.', + 'token' => 'El token de restablecimiento de contraseƱa es invĆ”lido.', + 'user' => 'No encontramos ningĆŗn usuario con ese correo electrĆ³nico.', ]; diff --git a/lang/es/validation.php b/lang/es/validation.php new file mode 100644 index 000000000..43631f27d --- /dev/null +++ b/lang/es/validation.php @@ -0,0 +1,138 @@ + ':attribute debe ser aceptado.', + 'accepted_if' => ':attribute debe ser aceptado cuando :other sea :value.', + 'active_url' => ':attribute no es una URL vĆ”lida.', + 'after' => ':attribute debe ser una fecha posterior a :date.', + 'after_or_equal' => ':attribute debe ser una fecha posterior o igual a :date.', + 'alpha' => ':attribute sĆ³lo debe contener letras.', + 'alpha_dash' => ':attribute sĆ³lo debe contener letras, nĆŗmeros, guiones y guiones bajos.', + 'alpha_num' => ':attribute sĆ³lo debe contener letras y nĆŗmeros.', + 'array' => ':attribute debe ser un conjunto.', + 'attached' => 'Este :attribute ya se adjuntĆ³.', + 'before' => ':attribute debe ser una fecha anterior a :date.', + 'before_or_equal' => ':attribute debe ser una fecha anterior o igual a :date.', + 'between' => [ + 'array' => ':attribute tiene que tener entre :min - :max elementos.', + 'file' => ':attribute debe pesar entre :min - :max kilobytes.', + 'numeric' => ':attribute tiene que estar entre :min - :max.', + 'string' => ':attribute tiene que tener entre :min - :max caracteres.', + ], + 'boolean' => 'El campo :attribute debe tener un valor verdadero o falso.', + 'confirmed' => 'La confirmaciĆ³n de :attribute no coincide.', + 'current_password' => 'La contraseƱa es incorrecta.', + 'date' => ':attribute no es una fecha vĆ”lida.', + 'date_equals' => ':attribute debe ser una fecha igual a :date.', + 'date_format' => ':attribute no corresponde al formato :format.', + 'declined' => ':attribute debe ser rechazado.', + 'declined_if' => ':attribute debe ser rechazado cuando :other sea :value.', + 'different' => ':attribute y :other deben ser diferentes.', + 'digits' => ':attribute debe tener :digits dĆ­gitos.', + 'digits_between' => ':attribute debe tener entre :min y :max dĆ­gitos.', + 'dimensions' => 'Las dimensiones de la imagen :attribute no son vĆ”lidas.', + 'distinct' => 'El campo :attribute contiene un valor duplicado.', + 'email' => ':attribute no es un correo vĆ”lido.', + 'ends_with' => 'El campo :attribute debe finalizar con uno de los siguientes valores: :values', + 'exists' => ':attribute es invĆ”lido.', + 'file' => 'El campo :attribute debe ser un archivo.', + 'filled' => 'El campo :attribute es obligatorio.', + 'gt' => [ + 'array' => 'El campo :attribute debe tener mĆ”s de :value elementos.', + 'file' => 'El campo :attribute debe tener mĆ”s de :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser mayor que :value.', + 'string' => 'El campo :attribute debe tener mĆ”s de :value caracteres.', + ], + 'gte' => [ + 'array' => 'El campo :attribute debe tener como mĆ­nimo :value elementos.', + 'file' => 'El campo :attribute debe tener como mĆ­nimo :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser como mĆ­nimo :value.', + 'string' => 'El campo :attribute debe tener como mĆ­nimo :value caracteres.', + ], + 'image' => ':attribute debe ser una imagen.', + 'in' => ':attribute es invĆ”lido.', + 'in_array' => 'El campo :attribute no existe en :other.', + 'integer' => ':attribute debe ser un nĆŗmero entero.', + 'ip' => ':attribute debe ser una direcciĆ³n IP vĆ”lida.', + 'ipv4' => ':attribute debe ser una direcciĆ³n IPv4 vĆ”lida.', + 'ipv6' => ':attribute debe ser una direcciĆ³n IPv6 vĆ”lida.', + 'json' => 'El campo :attribute debe ser una cadena JSON vĆ”lida.', + 'lt' => [ + 'array' => 'El campo :attribute debe tener menos de :value elementos.', + 'file' => 'El campo :attribute debe tener menos de :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser menor que :value.', + 'string' => 'El campo :attribute debe tener menos de :value caracteres.', + ], + 'lte' => [ + 'array' => 'El campo :attribute debe tener como mĆ”ximo :value elementos.', + 'file' => 'El campo :attribute debe tener como mĆ”ximo :value kilobytes.', + 'numeric' => 'El campo :attribute debe ser como mĆ”ximo :value.', + 'string' => 'El campo :attribute debe tener como mĆ”ximo :value caracteres.', + ], + 'max' => [ + 'array' => ':attribute no debe tener mĆ”s de :max elementos.', + 'file' => ':attribute no debe ser mayor que :max kilobytes.', + 'numeric' => ':attribute no debe ser mayor que :max.', + 'string' => ':attribute no debe ser mayor que :max caracteres.', + ], + 'mimes' => ':attribute debe ser un archivo con formato: :values.', + 'mimetypes' => ':attribute debe ser un archivo con formato: :values.', + 'min' => [ + 'array' => ':attribute debe tener al menos :min elementos.', + 'file' => 'El tamaƱo de :attribute debe ser de al menos :min kilobytes.', + 'numeric' => 'El tamaƱo de :attribute debe ser de al menos :min.', + 'string' => ':attribute debe contener al menos :min caracteres.', + ], + 'multiple_of' => 'El campo :attribute debe ser mĆŗltiplo de :value', + 'not_in' => ':attribute es invĆ”lido.', + 'not_regex' => 'El formato del campo :attribute no es vĆ”lido.', + 'numeric' => ':attribute debe ser numĆ©rico.', + 'password' => 'La contraseƱa es incorrecta.', + 'present' => 'El campo :attribute debe estar presente.', + 'prohibited' => 'El campo :attribute estĆ” prohibido.', + 'prohibited_if' => 'El campo :attribute estĆ” prohibido cuando :other es :value.', + 'prohibited_unless' => 'El campo :attribute estĆ” prohibido a menos que :other sea :values.', + 'prohibits' => 'El campo :attribute prohibe que :other estĆ© presente.', + 'regex' => 'El formato de :attribute es invĆ”lido.', + 'relatable' => 'Este :attribute no se puede asociar con este recurso', + 'required' => 'El campo :attribute es obligatorio.', + 'required_if' => 'El campo :attribute es obligatorio cuando :other es :value.', + 'required_unless' => 'El campo :attribute es obligatorio a menos que :other estĆ© en :values.', + 'required_with' => 'El campo :attribute es obligatorio cuando :values estĆ” presente.', + 'required_with_all' => 'El campo :attribute es obligatorio cuando :values estĆ”n presentes.', + 'required_without' => 'El campo :attribute es obligatorio cuando :values no estĆ” presente.', + 'required_without_all' => 'El campo :attribute es obligatorio cuando ninguno de :values estĆ” presente.', + 'same' => ':attribute y :other deben coincidir.', + 'size' => [ + 'array' => ':attribute debe contener :size elementos.', + 'file' => 'El tamaƱo de :attribute debe ser :size kilobytes.', + 'numeric' => 'El tamaƱo de :attribute debe ser :size.', + 'string' => ':attribute debe contener :size caracteres.', + ], + 'starts_with' => 'El campo :attribute debe comenzar con uno de los siguientes valores: :values', + 'string' => 'El campo :attribute debe ser una cadena de caracteres.', + 'timezone' => ':Attribute debe ser una zona horaria vĆ”lida.', + 'unique' => 'El campo :attribute ya ha sido registrado.', + 'uploaded' => 'Subir :attribute ha fallado.', + 'url' => ':Attribute debe ser una URL vĆ”lida.', + 'uuid' => 'El campo :attribute debe ser un UUID vĆ”lido.', + 'custom' => [ + 'email' => [ + 'unique' => 'El :attribute ya ha sido registrado.', + ], + 'password' => [ + 'min' => 'La :attribute debe contener mĆ”s de :min caracteres', + ], + ], +]; diff --git a/resources/lang/fr.json b/lang/fr.json similarity index 99% rename from resources/lang/fr.json rename to lang/fr.json index 7c21a7359..f415e5c62 100644 --- a/resources/lang/fr.json +++ b/lang/fr.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "veuillez crĆ©er un fichier appelĆ© \"install.lock\" dans le rĆ©pertoire racine de votre tableau de bord. Sinon, aucun paramĆØtre ne sera chargĆ©!", "or click here": "ou cliquez ici", "Company Name": "Nom de la compagnie", - "Company Adress": "Adresse de la compagnie", + "Company Address": "Adresse de la compagnie", "Company Phonenumber": "NumĆ©ro de tĆ©lĆ©phone de l'entreprise", "VAT ID": "VAT ID", - "Company E-Mail Adress": "Adresse Ć©lectronique de l'entreprise", + "Company E-Mail Address": "Adresse Ć©lectronique de l'entreprise", "Company Website": "Site Web de l'entreprise", "Invoice Prefix": "PrĆ©fixe de facturation", "Enable Invoices": "Activer les factures", @@ -199,7 +199,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Russian", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/fr/auth.php b/lang/fr/auth.php similarity index 87% rename from resources/lang/fr/auth.php rename to lang/fr/auth.php index e808c61b4..cb661c966 100644 --- a/resources/lang/fr/auth.php +++ b/lang/fr/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Ces identifiants ne correspondent pas Ć  nos enregistrements.', + 'failed' => 'Ces identifiants ne correspondent pas Ć  nos enregistrements.', 'password' => 'Le mot de passe fourni est incorrect.', 'throttle' => 'Tentatives de connexion trop nombreuses. Veuillez essayer de nouveau dans :seconds secondes.', ]; diff --git a/resources/lang/fr/pagination.php b/lang/fr/pagination.php similarity index 92% rename from resources/lang/fr/pagination.php rename to lang/fr/pagination.php index efa11ec19..a5542c328 100644 --- a/resources/lang/fr/pagination.php +++ b/lang/fr/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Suivant »', + 'next' => 'Suivant »', 'previous' => '« PrĆ©cĆ©dent', ]; diff --git a/resources/lang/fr/passwords.php b/lang/fr/passwords.php similarity index 58% rename from resources/lang/fr/passwords.php rename to lang/fr/passwords.php index dd0681866..99a48b1db 100644 --- a/resources/lang/fr/passwords.php +++ b/lang/fr/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Votre mot de passe a Ć©tĆ© rĆ©initialisĆ© !', - 'sent' => 'Nous vous avons envoyĆ© par email le lien de rĆ©initialisation du mot de passe !', + 'reset' => 'Votre mot de passe a Ć©tĆ© rĆ©initialisĆ© !', + 'sent' => 'Nous vous avons envoyĆ© par email le lien de rĆ©initialisation du mot de passe !', 'throttled' => 'Veuillez patienter avant de rĆ©essayer.', - 'token' => 'Ce jeton de rĆ©initialisation du mot de passe n\'est pas valide.', - 'user' => 'Aucun utilisateur n\'a Ć©tĆ© trouvĆ© avec cette adresse email.', + 'token' => 'Ce jeton de rĆ©initialisation du mot de passe n\'est pas valide.', + 'user' => 'Aucun utilisateur n\'a Ć©tĆ© trouvĆ© avec cette adresse email.', ]; diff --git a/lang/fr/validation.php b/lang/fr/validation.php new file mode 100644 index 000000000..e776c24c0 --- /dev/null +++ b/lang/fr/validation.php @@ -0,0 +1,135 @@ + 'Le champ :attribute doit ĆŖtre acceptĆ©.', + 'accepted_if' => 'Le champ :attribute doit ĆŖtre acceptĆ© quand :other a la valeur :value.', + 'active_url' => 'Le champ :attribute n\'est pas une URL valide.', + 'after' => 'Le champ :attribute doit ĆŖtre une date postĆ©rieure au :date.', + 'after_or_equal' => 'Le champ :attribute doit ĆŖtre une date postĆ©rieure ou Ć©gale au :date.', + 'alpha' => 'Le champ :attribute doit contenir uniquement des lettres.', + 'alpha_dash' => 'Le champ :attribute doit contenir uniquement des lettres, des chiffres et des tirets.', + 'alpha_num' => 'Le champ :attribute doit contenir uniquement des chiffres et des lettres.', + 'array' => 'Le champ :attribute doit ĆŖtre un tableau.', + 'attached' => ':attribute est dĆ©jĆ  attachĆ©(e).', + 'before' => 'Le champ :attribute doit ĆŖtre une date antĆ©rieure au :date.', + 'before_or_equal' => 'Le champ :attribute doit ĆŖtre une date antĆ©rieure ou Ć©gale au :date.', + 'between' => [ + 'array' => 'Le tableau :attribute doit contenir entre :min et :max Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute doit ĆŖtre comprise entre :min et :max kilo-octets.', + 'numeric' => 'La valeur de :attribute doit ĆŖtre comprise entre :min et :max.', + 'string' => 'Le texte :attribute doit contenir entre :min et :max caractĆØres.', + ], + 'boolean' => 'Le champ :attribute doit ĆŖtre vrai ou faux.', + 'confirmed' => 'Le champ de confirmation :attribute ne correspond pas.', + 'current_password' => 'Le mot de passe est incorrect.', + 'date' => 'Le champ :attribute n\'est pas une date valide.', + 'date_equals' => 'Le champ :attribute doit ĆŖtre une date Ć©gale Ć  :date.', + 'date_format' => 'Le champ :attribute ne correspond pas au format :format.', + 'declined' => 'Le champ :attribute doit ĆŖtre dĆ©clinĆ©.', + 'declined_if' => 'Le champ :attribute doit ĆŖtre dĆ©clinĆ© quand :other a la valeur :value.', + 'different' => 'Les champs :attribute et :other doivent ĆŖtre diffĆ©rents.', + 'digits' => 'Le champ :attribute doit contenir :digits chiffres.', + 'digits_between' => 'Le champ :attribute doit contenir entre :min et :max chiffres.', + 'dimensions' => 'La taille de l\'image :attribute n\'est pas conforme.', + 'distinct' => 'Le champ :attribute a une valeur en double.', + 'email' => 'Le champ :attribute doit ĆŖtre une adresse e-mail valide.', + 'ends_with' => 'Le champ :attribute doit se terminer par une des valeurs suivantes : :values', + 'exists' => 'Le champ :attribute sĆ©lectionnĆ© est invalide.', + 'file' => 'Le champ :attribute doit ĆŖtre un fichier.', + 'filled' => 'Le champ :attribute doit avoir une valeur.', + 'gt' => [ + 'array' => 'Le tableau :attribute doit contenir plus de :value Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute doit ĆŖtre supĆ©rieure Ć  :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit ĆŖtre supĆ©rieure Ć  :value.', + 'string' => 'Le texte :attribute doit contenir plus de :value caractĆØres.', + ], + 'gte' => [ + 'array' => 'Le tableau :attribute doit contenir au moins :value Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute doit ĆŖtre supĆ©rieure ou Ć©gale Ć  :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit ĆŖtre supĆ©rieure ou Ć©gale Ć  :value.', + 'string' => 'Le texte :attribute doit contenir au moins :value caractĆØres.', + ], + 'image' => 'Le champ :attribute doit ĆŖtre une image.', + 'in' => 'Le champ :attribute est invalide.', + 'in_array' => 'Le champ :attribute n\'existe pas dans :other.', + 'integer' => 'Le champ :attribute doit ĆŖtre un entier.', + 'ip' => 'Le champ :attribute doit ĆŖtre une adresse IP valide.', + 'ipv4' => 'Le champ :attribute doit ĆŖtre une adresse IPv4 valide.', + 'ipv6' => 'Le champ :attribute doit ĆŖtre une adresse IPv6 valide.', + 'json' => 'Le champ :attribute doit ĆŖtre un document JSON valide.', + 'lt' => [ + 'array' => 'Le tableau :attribute doit contenir moins de :value Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute doit ĆŖtre infĆ©rieure Ć  :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit ĆŖtre infĆ©rieure Ć  :value.', + 'string' => 'Le texte :attribute doit contenir moins de :value caractĆØres.', + ], + 'lte' => [ + 'array' => 'Le tableau :attribute doit contenir au plus :value Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute doit ĆŖtre infĆ©rieure ou Ć©gale Ć  :value kilo-octets.', + 'numeric' => 'La valeur de :attribute doit ĆŖtre infĆ©rieure ou Ć©gale Ć  :value.', + 'string' => 'Le texte :attribute doit contenir au plus :value caractĆØres.', + ], + 'max' => [ + 'array' => 'Le tableau :attribute ne peut contenir plus de :max Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute ne peut pas dĆ©passer :max kilo-octets.', + 'numeric' => 'La valeur de :attribute ne peut ĆŖtre supĆ©rieure Ć  :max.', + 'string' => 'Le texte de :attribute ne peut contenir plus de :max caractĆØres.', + ], + 'mimes' => 'Le champ :attribute doit ĆŖtre un fichier de type : :values.', + 'mimetypes' => 'Le champ :attribute doit ĆŖtre un fichier de type : :values.', + 'min' => [ + 'array' => 'Le tableau :attribute doit contenir au moins :min Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute doit ĆŖtre supĆ©rieure Ć  :min kilo-octets.', + 'numeric' => 'La valeur de :attribute doit ĆŖtre supĆ©rieure ou Ć©gale Ć  :min.', + 'string' => 'Le texte :attribute doit contenir au moins :min caractĆØres.', + ], + 'multiple_of' => 'La valeur de :attribute doit ĆŖtre un multiple de :value', + 'not_in' => 'Le champ :attribute sĆ©lectionnĆ© n\'est pas valide.', + 'not_regex' => 'Le format du champ :attribute n\'est pas valide.', + 'numeric' => 'Le champ :attribute doit contenir un nombre.', + 'password' => 'Le mot de passe est incorrect', + 'present' => 'Le champ :attribute doit ĆŖtre prĆ©sent.', + 'prohibited' => 'Le champ :attribute est interdit.', + 'prohibited_if' => 'Le champ :attribute est interdit quand :other a la valeur :value.', + 'prohibited_unless' => 'Le champ :attribute est interdit Ć  moins que :other est l\'une des valeurs :values.', + 'prohibits' => 'Le champ :attribute interdit :other d\'ĆŖtre prĆ©sent.', + 'regex' => 'Le format du champ :attribute est invalide.', + 'relatable' => ':attribute n\'est sans doute pas associĆ©(e) avec cette donnĆ©e.', + 'required' => 'Le champ :attribute est obligatoire.', + 'required_if' => 'Le champ :attribute est obligatoire quand la valeur de :other est :value.', + 'required_unless' => 'Le champ :attribute est obligatoire sauf si :other est :values.', + 'required_with' => 'Le champ :attribute est obligatoire quand :values est prĆ©sent.', + 'required_with_all' => 'Le champ :attribute est obligatoire quand :values sont prĆ©sents.', + 'required_without' => 'Le champ :attribute est obligatoire quand :values n\'est pas prĆ©sent.', + 'required_without_all' => 'Le champ :attribute est requis quand aucun de :values n\'est prĆ©sent.', + 'same' => 'Les champs :attribute et :other doivent ĆŖtre identiques.', + 'size' => [ + 'array' => 'Le tableau :attribute doit contenir :size Ć©lĆ©ments.', + 'file' => 'La taille du fichier de :attribute doit ĆŖtre de :size kilo-octets.', + 'numeric' => 'La valeur de :attribute doit ĆŖtre :size.', + 'string' => 'Le texte de :attribute doit contenir :size caractĆØres.', + ], + 'starts_with' => 'Le champ :attribute doit commencer avec une des valeurs suivantes : :values', + 'string' => 'Le champ :attribute doit ĆŖtre une chaĆ®ne de caractĆØres.', + 'timezone' => 'Le champ :attribute doit ĆŖtre un fuseau horaire valide.', + 'unique' => 'La valeur du champ :attribute est dĆ©jĆ  utilisĆ©e.', + 'uploaded' => 'Le fichier du champ :attribute n\'a pu ĆŖtre tĆ©lĆ©versĆ©.', + 'url' => 'Le format de l\'URL de :attribute n\'est pas valide.', + 'uuid' => 'Le champ :attribute doit ĆŖtre un UUID valide', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], +]; diff --git a/resources/lang/he.json b/lang/he.json similarity index 99% rename from resources/lang/he.json rename to lang/he.json index da4d205bd..a1524d6fb 100644 --- a/resources/lang/he.json +++ b/lang/he.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "אנא צו×Ø ×§×•×‘×„ בשם \"install.lock\" בהפ×Øיי×Ŗ השו×Øש של dashboard שלך. אח×Ø×Ŗ לא ייטענו הגד×Øו×Ŗ!", "or click here": "או לחׄ כאן", "Company Name": "שם החב×Øה", - "Company Adress": "כ×Ŗוב×Ŗ החב×Øה", + "Company Address": "כ×Ŗוב×Ŗ החב×Øה", "Company Phonenumber": "מהפ×Ø ×˜×œ×¤×•×Ÿ של החב×Øה", "VAT ID": "מזהה מעמ", - "Company E-Mail Adress": "כ×Ŗוב×Ŗ מייל של החב×Øה", + "Company E-Mail Address": "כ×Ŗוב×Ŗ מייל של החב×Øה", "Company Website": "א×Ŗ×Ø ×”×—×‘×Øה", "Invoice Prefix": "קידומ×Ŗ החשבונים", "Enable Invoices": "אפש×Ø ×—×©×‘×•× ×™×•×Ŗ", @@ -199,7 +199,7 @@ "Mail Username": "שם המייל", "Mail Password": "היהמ×Ŗ המייל", "Mail Encryption": "הצפנ×Ŗ המייל", - "Mail From Adress": "מייל מכ×Ŗוב×Ŗ", + "Mail From Address": "מייל מכ×Ŗוב×Ŗ", "Mail From Name": "מייל משם", "Discord Client-ID": "מזהה של בוט דיהקו×Øד", "Discord Client-Secret": "מזהה הודי של בוט דיהקו×Øד", @@ -461,4 +461,4 @@ "ru": "×Øוהי×Ŗ", "sv": "שוודי×Ŗ", "sk": "הלובקי×Ŗ" -} \ No newline at end of file +} diff --git a/resources/lang/hi.json b/lang/hi.json similarity index 99% rename from resources/lang/hi.json rename to lang/hi.json index 68eba9f93..e7b950b14 100644 --- a/resources/lang/hi.json +++ b/lang/hi.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "ą¤•ą„ƒą¤Ŗą¤Æą¤¾ ą¤…ą¤Ŗą¤Øą„‡ ą¤”ą„ˆą¤¶ą¤¬ą„‹ą¤°ą„ą¤” ą¤°ą„‚ą¤Ÿ ą¤Øą¤æą¤°ą„ą¤¦ą„‡ą¤¶ą¤æą¤•ą¤¾ ą¤®ą„‡ą¤‚ \"install.lock\" ą¤Øą¤¾ą¤®ą¤• ą¤ą¤• ą¤«ą¤¼ą¤¾ą¤‡ą¤² ą¤¬ą¤Øą¤¾ą¤ą¤‚ą„¤ ą¤…ą¤Øą„ą¤Æą¤„ą¤¾ ą¤•ą„‹ą¤ˆ ą¤øą„‡ą¤Ÿą¤æą¤‚ą¤— ą¤²ą„‹ą¤” ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ą¤—ą„€!", "or click here": "ą¤Æą¤¾ ą¤Æą¤¹ą¤¾ą¤ ą¤•ą„ą¤²ą¤æą¤• ą¤•ą¤°ą„‡ą¤‚", "Company Name": "ą¤•ą¤‚ą¤Ŗą¤Øą„€ ą¤•ą¤¾ ą¤Øą¤¾ą¤®", - "Company Adress": "ą¤•ą¤®ą„ą¤Ŗą¤Øą„€ ą¤•ą¤¾ ą¤Ŗą¤¤ą¤¾", + "Company Address": "ą¤•ą¤®ą„ą¤Ŗą¤Øą„€ ą¤•ą¤¾ ą¤Ŗą¤¤ą¤¾", "Company Phonenumber": "ą¤•ą¤‚ą¤Ŗą¤Øą„€ ą¤«ą„‹ą¤Øą¤Øą¤‚ą¤¬ą¤°", "VAT ID": "ą¤Ÿą„ˆą¤•ą„ą¤ø ą¤†ą¤ˆą¤”ą„€", - "Company E-Mail Adress": "ą¤•ą¤‚ą¤Ŗą¤Øą„€ ą¤ˆą¤®ą„‡ą¤² ą¤Ŗą¤¤ą¤¾", + "Company E-Mail Address": "ą¤•ą¤‚ą¤Ŗą¤Øą„€ ą¤ˆą¤®ą„‡ą¤² ą¤Ŗą¤¤ą¤¾", "Company Website": "ą¤•ą¤‚ą¤Ŗą¤Øą„€ ą¤•ą„€ ą¤µą„‡ą¤¬ą¤øą¤¾ą¤‡ą¤Ÿ", "Invoice Prefix": "ą¤šą¤¾ą¤²ą¤¾ą¤Ø ą¤‰ą¤Ŗą¤øą¤°ą„ą¤—", "Enable Invoices": "ą¤šą¤¾ą¤²ą¤¾ą¤Ø ą¤øą¤•ą„ą¤·ą¤® ą¤•ą¤°ą„‡ą¤‚", @@ -199,7 +199,7 @@ "Mail Username": "ą¤®ą„‡ą¤² ą¤‰ą¤Ŗą¤Æą„‹ą¤—ą¤•ą¤°ą„ą¤¤ą¤¾ ą¤Øą¤¾ą¤®", "Mail Password": "ą¤®ą„‡ą¤² ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤”", "Mail Encryption": "ą¤®ą„‡ą¤² ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤”", - "Mail From Adress": "ą¤Ŗą¤¤ą„‡ ą¤øą„‡ ą¤®ą„‡ą¤²", + "Mail From Address": "ą¤Ŗą¤¤ą„‡ ą¤øą„‡ ą¤®ą„‡ą¤²", "Mail From Name": "ą¤Øą¤¾ą¤® ą¤øą„‡ ą¤®ą„‡ą¤²", "Discord Client-ID": "ą¤•ą¤²ą¤¹ ą¤•ą„ą¤²ą¤¾ą¤‡ą¤‚ą¤Ÿ-ą¤†ą¤ˆą¤”ą„€", "Discord Client-Secret": "ą¤•ą¤²ą¤¹ ą¤—ą„ą¤°ą¤¾ą¤¹ą¤•-ą¤—ą„ą¤Ŗą„ą¤¤", @@ -461,4 +461,4 @@ "ru": "ą¤°ą„‚ą¤øą„€", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/hi/auth.php b/lang/hi/auth.php similarity index 82% rename from resources/lang/hi/auth.php rename to lang/hi/auth.php index 25c616e79..58ce4f7fe 100644 --- a/resources/lang/hi/auth.php +++ b/lang/hi/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'ą¤Æą„‡ ą¤øą¤¾ą¤– ą¤¹ą¤®ą¤¾ą¤°ą„‡ ą¤°ą¤æą¤•ą„‰ą¤°ą„ą¤” ą¤øą„‡ ą¤®ą„‡ą¤² ą¤Øą¤¹ą„€ą¤‚ ą¤–ą¤¾ ą¤°ą¤¹ą„‡ ą¤¹ą„ˆą¤‚ą„¤', + 'failed' => 'ą¤Æą„‡ ą¤øą¤¾ą¤– ą¤¹ą¤®ą¤¾ą¤°ą„‡ ą¤°ą¤æą¤•ą„‰ą¤°ą„ą¤” ą¤øą„‡ ą¤®ą„‡ą¤² ą¤Øą¤¹ą„€ą¤‚ ą¤–ą¤¾ ą¤°ą¤¹ą„‡ ą¤¹ą„ˆą¤‚ą„¤', 'password' => 'The provided password is incorrect.', 'throttle' => 'ą¤¬ą¤¹ą„ą¤¤ ą¤øą¤¾ą¤°ą„‡ ą¤²ą„‰ą¤—ą¤æą¤Ø ą¤Ŗą„ą¤°ą¤Æą¤¾ą¤øą„¤ :seconds ą¤øą„‡ą¤•ą¤‚ą¤” ą¤®ą„‡ą¤‚ ą¤«ą¤æą¤° ą¤øą„‡ ą¤•ą„‹ą¤¶ą¤æą¤¶ ą¤•ą¤°ą„‡ą¤‚ą„¤', ]; diff --git a/resources/lang/hi/pagination.php b/lang/hi/pagination.php similarity index 91% rename from resources/lang/hi/pagination.php rename to lang/hi/pagination.php index 2f71e2759..56f43e76d 100644 --- a/resources/lang/hi/pagination.php +++ b/lang/hi/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'ą¤…ą¤—ą¤²ą¤¾ »', + 'next' => 'ą¤…ą¤—ą¤²ą¤¾ »', 'previous' => '« ą¤Ŗą¤æą¤›ą¤²ą¤¾', ]; diff --git a/resources/lang/hi/passwords.php b/lang/hi/passwords.php similarity index 52% rename from resources/lang/hi/passwords.php rename to lang/hi/passwords.php index b37ae7e32..2b655c1b4 100644 --- a/resources/lang/hi/passwords.php +++ b/lang/hi/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'ą¤†ą¤Ŗą¤•ą¤¾ ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤” ą¤°ą„€ą¤øą„‡ą¤Ÿ ą¤•ą¤° ą¤¦ą¤æą¤Æą¤¾ ą¤—ą¤Æą¤¾ ą¤¹ą„ˆ!', - 'sent' => 'ą¤¹ą¤®ą¤Øą„‡ ą¤†ą¤Ŗą¤•ą„‹ ą¤ą¤• ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤” ą¤°ą„€ą¤øą„‡ą¤Ÿ ą¤²ą¤æą¤‚ą¤• ą¤ˆ-ą¤®ą„‡ą¤² ą¤•ą¤æą¤Æą¤¾ ą¤¹ą„ˆ!', + 'reset' => 'ą¤†ą¤Ŗą¤•ą¤¾ ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤” ą¤°ą„€ą¤øą„‡ą¤Ÿ ą¤•ą¤° ą¤¦ą¤æą¤Æą¤¾ ą¤—ą¤Æą¤¾ ą¤¹ą„ˆ!', + 'sent' => 'ą¤¹ą¤®ą¤Øą„‡ ą¤†ą¤Ŗą¤•ą„‹ ą¤ą¤• ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤” ą¤°ą„€ą¤øą„‡ą¤Ÿ ą¤²ą¤æą¤‚ą¤• ą¤ˆ-ą¤®ą„‡ą¤² ą¤•ą¤æą¤Æą¤¾ ą¤¹ą„ˆ!', 'throttled' => 'ą¤•ą„ƒą¤Ŗą¤Æą¤¾ ą¤Ŗą„ą¤Ø: ą¤Ŗą„ą¤°ą¤Æą¤¾ą¤ø ą¤•ą¤°ą¤Øą„‡ ą¤øą„‡ ą¤Ŗą¤¹ą¤²ą„‡ ą¤Ŗą„ą¤°ą¤¤ą„€ą¤•ą„ą¤·ą¤¾ ą¤•ą¤°ą„‡ą¤‚ ą„¤ ', - 'token' => 'ą¤Æą¤¹ ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤” ą¤°ą„€ą¤øą„‡ą¤Ÿ ą¤Ÿą„‹ą¤•ą¤Ø ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', - 'user' => 'ą¤¹ą¤®ą„‡ą¤‚ ą¤‰ą¤ø ą¤ˆ-ą¤®ą„‡ą¤² ą¤Ŗą¤¤ą„‡ ą¤•ą„‡ ą¤øą¤¾ą¤„ ą¤ą¤• ą¤‰ą¤Ŗą¤Æą„‹ą¤—ą¤•ą¤°ą„ą¤¤ą¤¾ ą¤Øą¤¹ą„€ą¤‚ ą¤®ą¤æą¤² ą¤øą¤•ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'token' => 'ą¤Æą¤¹ ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤” ą¤°ą„€ą¤øą„‡ą¤Ÿ ą¤Ÿą„‹ą¤•ą¤Ø ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', + 'user' => 'ą¤¹ą¤®ą„‡ą¤‚ ą¤‰ą¤ø ą¤ˆ-ą¤®ą„‡ą¤² ą¤Ŗą¤¤ą„‡ ą¤•ą„‡ ą¤øą¤¾ą¤„ ą¤ą¤• ą¤‰ą¤Ŗą¤Æą„‹ą¤—ą¤•ą¤°ą„ą¤¤ą¤¾ ą¤Øą¤¹ą„€ą¤‚ ą¤®ą¤æą¤² ą¤øą¤•ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', ]; diff --git a/lang/hi/validation.php b/lang/hi/validation.php new file mode 100644 index 000000000..302119f03 --- /dev/null +++ b/lang/hi/validation.php @@ -0,0 +1,135 @@ + ':attribute ą¤•ą„‹ ą¤øą„ą¤µą„€ą¤•ą¤¾ą¤° ą¤•ą¤æą¤Æą¤¾ ą¤œą¤¾ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'accepted_if' => 'The :attribute must be accepted when :other is :value.', + 'active_url' => ':attribute ą¤ą¤• ą¤®ą¤¾ą¤Øą„ą¤Æ URL ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„ˆą„¤', + 'after' => ':attribute, :date ą¤•ą„‡ ą¤¬ą¤¾ą¤¦ ą¤•ą„€ ą¤ą¤• ą¤¤ą¤¾ą¤°ą„€ą¤– ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'after_or_equal' => ':attribute, :date ą¤•ą„‡ ą¤¬ą¤¾ą¤¦ ą¤Æą¤¾ ą¤‰ą¤øą¤•ą„‡ ą¤¬ą¤°ą¤¾ą¤¬ą¤° ą¤•ą„€ ą¤¤ą¤¾ą¤°ą„€ą¤– ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'alpha' => ':attribute ą¤®ą„‡ą¤‚ ą¤•ą„‡ą¤µą¤² ą¤…ą¤•ą„ą¤·ą¤° ą¤¹ą„‹ ą¤øą¤•ą¤¤ą„‡ ą¤¹ą„ˆą¤‚ą„¤', + 'alpha_dash' => ':attribute ą¤®ą„‡ą¤‚ ą¤•ą„‡ą¤µą¤² ą¤…ą¤•ą„ą¤·ą¤°, ą¤øą¤‚ą¤–ą„ą¤Æą¤¾, ą¤”ą¤° ą¤”ą„ˆą¤¶ ą¤¹ą„‹ ą¤øą¤•ą¤¤ą„‡ ą¤¹ą„ˆą¤‚ą„¤', + 'alpha_num' => ':attribute ą¤®ą„‡ą¤‚ ą¤•ą„‡ą¤µą¤² ą¤…ą¤•ą„ą¤·ą¤° ą¤”ą¤° ą¤øą¤‚ą¤–ą„ą¤Æą¤¾ą¤ą¤‚ ą¤¹ą„‹ ą¤øą¤•ą¤¤ą„€ ą¤¹ą„ˆą¤‚ą„¤', + 'array' => ':attribute ą¤ą¤• ą¤øą¤°ą¤£ą„€ ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'attached' => 'ą¤Æą¤¹ :attribute ą¤Ŗą¤¹ą¤²ą„‡ ą¤øą„‡ ą¤¹ą„€ ą¤øą¤‚ą¤²ą¤—ą„ą¤Ø ą¤¹ą„ˆ ą„¤ ', + 'before' => ':attribute, :date ą¤øą„‡ ą¤Ŗą¤¹ą¤²ą„‡ ą¤•ą„€ ą¤ą¤• ą¤¤ą¤¾ą¤°ą„€ą¤– ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'before_or_equal' => ':attribute, :date ą¤‡ą¤øą¤øą„‡ ą¤Ŗą¤¹ą¤²ą„‡ ą¤Æą¤¾ ą¤‰ą¤øą¤•ą„‡ ą¤¬ą¤°ą¤¾ą¤¬ą¤° ą¤•ą„€ ą¤¤ą¤¾ą¤°ą„€ą¤– ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'between' => [ + 'array' => ':attribute, :min ą¤”ą¤° :max ą¤†ą¤‡ą¤Ÿą¤®ą„‹ą¤‚ ą¤•ą„‡ ą¤¬ą„€ą¤š ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'file' => ':attribute, :min ą¤”ą¤° :max ą¤•ą¤æą¤²ą„‹ą¤¬ą¤¾ą¤‡ą¤Ÿ ą¤•ą„‡ ą¤¬ą„€ą¤š ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'numeric' => ':attribute, :min ą¤”ą¤° :max ą¤•ą„‡ ą¤¬ą„€ą¤š ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'string' => ':attribute, :min ą¤”ą¤° :max ą¤µą¤°ą„ą¤£ą„‹ą¤‚ ą¤•ą„‡ ą¤¬ą„€ą¤š ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + ], + 'boolean' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤øą¤¹ą„€ ą¤Æą¤¾ ą¤—ą¤²ą¤¤ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'confirmed' => ':attribute ą¤Ŗą„ą¤·ą„ą¤Ÿą¤æą¤•ą¤°ą¤£ ą¤®ą„‡ą¤² ą¤Øą¤¹ą„€ą¤‚ ą¤–ą¤¾ ą¤°ą¤¹ą¤¾ ą¤¹ą„ˆą„¤', + 'current_password' => 'The password is incorrect.', + 'date' => ':attribute ą¤ą¤• ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¦ą¤æą¤Øą¤¾ą¤‚ą¤• ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„ˆą„¤', + 'date_equals' => ':attribute, :date ą¤•ą„‡ ą¤¬ą¤°ą¤¾ą¤¬ą¤° ą¤¤ą¤¾ą¤°ą„€ą¤– ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'date_format' => ':attribute ą¤«ą„‰ą¤°ą„ą¤®ą„‡ą¤Ÿ :format ą¤øą„‡ ą¤®ą„‡ą¤² ą¤Øą¤¹ą„€ą¤‚ ą¤–ą¤¾ ą¤°ą¤¹ą¤¾ ą¤¹ą„ˆą„¤', + 'declined' => 'The :attribute must be declined.', + 'declined_if' => 'The :attribute must be declined when :other is :value.', + 'different' => ':attribute ą¤”ą¤° :other ą¤…ą¤²ą¤— ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'digits' => ':attribute, :digits ą¤…ą¤‚ą¤• ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'digits_between' => ':attribute, :min ą¤”ą¤° :max ą¤…ą¤‚ą¤•ą„‹ą¤‚ ą¤•ą„‡ ą¤¬ą„€ą¤š ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'dimensions' => ':attribute ą¤•ą¤¾ ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤šą¤æą¤¤ą„ą¤¤ ą¤®ą¤¾ą¤Ŗ ą¤¹ą„ˆą„¤', + 'distinct' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤•ą¤¾ ą¤ą¤• ą¤”ą„ą¤Ŗą„ą¤²ą¤æą¤•ą„‡ą¤Ÿ ą¤®ą¤¾ą¤Ø ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'email' => ':attribute ą¤ą¤• ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤ˆą¤®ą„‡ą¤² ą¤Ŗą¤¤ą¤¾ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'ends_with' => ':attribute ą¤•ą„‹ ą¤Øą¤æą¤®ą„ą¤Øą¤²ą¤æą¤–ą¤æą¤¤ ą¤®ą„‡ą¤‚ ą¤øą„‡ ą¤ą¤• ą¤•ą„‡ ą¤øą¤¾ą¤„ ą¤øą¤®ą¤¾ą¤Ŗą„ą¤¤ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤: :values ą„¤ ', + 'exists' => 'ą¤šą„ą¤Øą¤¾ ą¤—ą¤Æą¤¾ :attribute ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', + 'file' => ':attribute ą¤ą¤• ą¤«ą¤¼ą¤¾ą¤‡ą¤² ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'filled' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'gt' => [ + 'array' => ':attribute, :value ą¤®ą¤¦ ą¤øą„‡ ą¤…ą¤§ą¤æą¤• ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'file' => ':attribute, :value kilobytes ą¤øą„‡ ą¤…ą¤§ą¤æą¤• ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'numeric' => ':attribute, :value ą¤øą„‡ ą¤…ą¤§ą¤æą¤• ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'string' => ':attribute, :value characters ą¤øą„‡ ą¤…ą¤§ą¤æą¤• ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + ], + 'gte' => [ + 'array' => 'The :attribute must have :value items or more.', + 'file' => 'The :attribute must be greater than or equal :value kilobytes.', + 'numeric' => 'The :attribute must be greater than or equal :value.', + 'string' => 'The :attribute must be greater than or equal :value characters.', + ], + 'image' => ':attribute ą¤ą¤• ą¤›ą¤µą¤æ ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'in' => 'ą¤šą„ą¤Øą¤¾ ą¤—ą¤Æą¤¾ :attribute ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', + 'in_array' => ':attribute ą¤«ą„€ą¤²ą„ą¤”, :other ą¤®ą„‡ą¤‚ ą¤®ą„Œą¤œą„‚ą¤¦ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„ˆą„¤', + 'integer' => ':attribute ą¤ą¤• ą¤Ŗą„‚ą¤°ą„ą¤£ą¤¾ą¤‚ą¤• ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'ip' => ':attribute ą¤ą¤• ą¤®ą¤¾ą¤Øą„ą¤Æ IP address ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'ipv4' => ':attribute ą¤ą¤• ą¤µą„ˆą¤§ IPv4 address ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'ipv6' => ':attribute ą¤ą¤• ą¤µą„ˆą¤§ IPv6 address ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'json' => ':attribute ą¤ą¤• ą¤®ą¤¾ą¤Øą„ą¤Æ JSON ą¤øą„ą¤Ÿą„ą¤°ą¤æą¤‚ą¤— ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'lt' => [ + 'array' => 'The :attribute must have less than :value items.', + 'file' => 'The :attribute must be less than :value kilobytes.', + 'numeric' => 'The :attribute must be less than :value.', + 'string' => 'The :attribute must be less than :value characters.', + ], + 'lte' => [ + 'array' => 'The :attribute must not have more than :value items.', + 'file' => 'The :attribute must be less than or equal :value kilobytes.', + 'numeric' => 'The :attribute must be less than or equal :value.', + 'string' => 'The :attribute must be less than or equal :value characters.', + ], + 'max' => [ + 'array' => ':attribute, :max ą¤†ą¤‡ą¤Ÿą¤®ą„‹ą¤‚ ą¤øą„‡ ą¤…ą¤§ą¤æą¤• ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ ą¤øą¤•ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'file' => ':attribute :max ą¤•ą¤æą¤²ą„‹ą¤¬ą¤¾ą¤‡ą¤Ÿ ą¤øą„‡ ą¤¬ą¤”ą¤¼ą¤¾ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ ą¤øą¤•ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'numeric' => ':attribute, :max ą¤øą„‡ ą¤¬ą¤”ą¤¼ą¤¾ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ ą¤øą¤•ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'string' => ':attribute, :max ą¤µą¤°ą„ą¤£ą„‹ą¤‚ ą¤øą„‡ ą¤¬ą¤”ą¤¼ą¤¾ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ ą¤øą¤•ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + ], + 'mimes' => ':attribute ą¤ą¤• ą¤Ŗą„ą¤°ą¤•ą¤¾ą¤° ą¤•ą„€ ą¤«ą¤¼ą¤¾ą¤‡ą¤²: :values ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'mimetypes' => ':attribute ą¤ą¤• ą¤Ŗą„ą¤°ą¤•ą¤¾ą¤° ą¤•ą„€ ą¤«ą¤¼ą¤¾ą¤‡ą¤²: :values ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'min' => [ + 'array' => ':attribute ą¤•ą¤® ą¤øą„‡ ą¤•ą¤® :min ą¤†ą¤‡ą¤Ÿą¤® ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'file' => ':attribute ą¤•ą¤® ą¤øą„‡ ą¤•ą¤® :min ą¤•ą¤æą¤²ą„‹ą¤¬ą¤¾ą¤‡ą¤Ÿ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'numeric' => ':attribute ą¤•ą¤® ą¤øą„‡ ą¤•ą¤® :min ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'string' => ':attribute ą¤•ą¤® ą¤øą„‡ ą¤•ą¤® :min ą¤µą¤°ą„ą¤£ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + ], + 'multiple_of' => ':attribute :value ą¤•ą¤¾ ą¤ą¤• ą¤¬ą¤¹ą„ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤', + 'not_in' => 'ą¤šą„ą¤Øą¤¾ ą¤—ą¤Æą¤¾ :attribute ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', + 'not_regex' => ':attribute ą¤Ŗą„ą¤°ą¤¾ą¤°ą„‚ą¤Ŗ ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', + 'numeric' => ':attribute ą¤ą¤• ą¤øą¤‚ą¤–ą„ą¤Æą¤¾ ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'password' => 'ą¤Ŗą¤¾ą¤øą¤µą¤°ą„ą¤” ą¤—ą¤²ą¤¤ ą¤¹ą„ˆ ą„¤ ', + 'present' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤®ą„Œą¤œą„‚ą¤¦ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'prohibited' => ':attribute ą¤•ą„ą¤·ą„‡ą¤¤ą„ą¤° ą¤Øą¤æą¤·ą¤æą¤¦ą„ą¤§ ą¤¹ą„ˆ ą„¤ ', + 'prohibited_if' => ':attribute ą¤•ą„ą¤·ą„‡ą¤¤ą„ą¤° ą¤Øą¤æą¤·ą¤æą¤¦ą„ą¤§ ą¤¹ą„ˆ ą¤œą¤¬ :other :value ą¤¹ą„ˆ ą„¤ ', + 'prohibited_unless' => ':attribute ą¤•ą„ą¤·ą„‡ą¤¤ą„ą¤° ą¤¤ą¤¬ ą¤¤ą¤• ą¤Øą¤æą¤·ą¤æą¤¦ą„ą¤§ ą¤¹ą„ˆ ą¤œą¤¬ ą¤¤ą¤• ą¤•ą¤æ :other :values ą¤®ą„‡ą¤‚ ą¤Ø ą¤¹ą„‹ ą„¤ ', + 'prohibits' => 'The :attribute field prohibits :other from being present.', + 'regex' => ':attribute ą¤«ą„‰ą¤°ą„ą¤®ą„‡ą¤Ÿ ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', + 'relatable' => 'ą¤Æą¤¹ :attribute ą¤‡ą¤ø ą¤øą¤‚ą¤øą¤¾ą¤§ą¤Ø ą¤øą„‡ ą¤øą¤‚ą¤¬ą¤¦ą„ą¤§ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ ą¤øą¤•ą¤¤ą¤¾ ą¤¹ą„ˆ ą„¤ ', + 'required' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'required_if' => ':attribute ą¤«ą¤¼ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆ ą¤œą¤¬ :other :value ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'required_unless' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆ ą¤œą¤¬ :other, :values ą¤®ą„‡ą¤‚ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'required_with' => ':attribute ą¤«ą¤¼ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆ ą¤œą¤¬ :values ą¤®ą„Œą¤œą„‚ą¤¦ ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'required_with_all' => ':attribute ą¤«ą¤¼ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆ ą¤œą¤¬ :values ą¤®ą„Œą¤œą„‚ą¤¦ ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'required_without' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆ ą¤œą¤¬ :values ą¤®ą„Œą¤œą„‚ą¤¦ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'required_without_all' => ':attribute ą¤«ą„€ą¤²ą„ą¤” ą¤†ą¤µą¤¶ą„ą¤Æą¤• ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆ ą¤œą¤¬ ą¤ą¤• ą¤­ą„€ :values ą¤®ą„Œą¤œą„‚ą¤¦ ą¤Øą¤¹ą„€ą¤‚ ą¤¹ą„‹ą¤¤ą¤¾ ą¤¹ą„ˆą„¤', + 'same' => ':attribute ą¤”ą¤° :other ą¤®ą„‡ą¤² ą¤–ą¤¾ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'size' => [ + 'array' => ':attribute ą¤®ą„‡ą¤‚ :size ą¤†ą¤‡ą¤Ÿą¤® ą¤¹ą„‹ą¤Øą„‡ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'file' => ':attribute, :size ą¤•ą¤æą¤²ą„‹ą¤¬ą¤¾ą¤‡ą¤Ÿ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'numeric' => ':attribute, :size ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'string' => ':attribute, :size ą¤µą¤°ą„ą¤£ ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + ], + 'starts_with' => ':attribute ą¤Øą¤æą¤®ą„ą¤Øą¤²ą¤æą¤–ą¤æą¤¤ ą¤®ą„‡ą¤‚ ą¤øą„‡ ą¤•ą¤æą¤øą„€ ą¤ą¤• ą¤øą„‡ ą¤¶ą„ą¤°ą„‚ ą¤•ą¤°ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤: :values', + 'string' => ':attribute ą¤ą¤• ą¤øą„ą¤Ÿą„ą¤°ą¤æą¤‚ą¤— ą¤¹ą„‹ą¤Øą„€ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'timezone' => ':attribute ą¤ą¤• ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤•ą„ą¤·ą„‡ą¤¤ą„ą¤° ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'unique' => ':attribute ą¤•ą„‹ ą¤Ŗą¤¹ą¤²ą„‡ ą¤¹ą„€ ą¤²ą„‡ ą¤²ą¤æą¤Æą¤¾ ą¤—ą¤Æą¤¾ ą¤¹ą„ˆą„¤', + 'uploaded' => ':attribute ą¤…ą¤Ŗą¤²ą„‹ą¤” ą¤•ą¤°ą¤Øą„‡ ą¤®ą„‡ą¤‚ ą¤µą¤æą¤«ą¤²ą„¤', + 'url' => ':attribute ą¤«ą„‰ą¤°ą„ą¤®ą„‡ą¤Ÿ ą¤…ą¤®ą¤¾ą¤Øą„ą¤Æ ą¤¹ą„ˆą„¤', + 'uuid' => ':attribute ą¤ą¤• ą¤µą„ˆą¤§ UUID ą¤¹ą„‹ą¤Øą¤¾ ą¤šą¤¾ą¤¹ą¤æą¤ą„¤', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'ą¤…ą¤Øą„ą¤•ą„‚ą¤²-ą¤øą¤‚ą¤¦ą„‡ą¤¶', + ], + ], +]; diff --git a/resources/lang/hu.json b/lang/hu.json similarity index 99% rename from resources/lang/hu.json rename to lang/hu.json index d6fbef0c3..744fcf0c3 100644 --- a/resources/lang/hu.json +++ b/lang/hu.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "kĆ©rlek hozz lĆ©tre egy fĆ”jlt 'install.lock' nĆ©ven az IrĆ”nyĆ­tĆ³pult gyƶker kƶnyvtĆ”rĆ”ban, kĆ¼lƶnben a beĆ”llĆ­tĆ”said nem lesznek betƶltve!", "or click here": "vagy kattints ide", "Company Name": "CĆ©g neve", - "Company Adress": "CĆ©g cĆ­me", + "Company Address": "CĆ©g cĆ­me", "Company Phonenumber": "CĆ©g telefonszĆ”ma", "VAT ID": "ƁFA AzonosĆ­tĆ³", - "Company E-Mail Adress": "CĆ©g email cĆ­me", + "Company E-Mail Address": "CĆ©g email cĆ­me", "Company Website": "CĆ©g weboldala", "Invoice Prefix": "SzĆ”mlĆ”zĆ”si előtag", "Enable Invoices": "SzĆ”mlĆ”zĆ”s engedĆ©lyezĆ©se", @@ -199,7 +199,7 @@ "Mail Username": "LevĆ©l FelhasznĆ”lĆ³nĆ©v", "Mail Password": "LevĆ©l JelszĆ³", "Mail Encryption": "LevĆ©l TitkosĆ­tĆ”s", - "Mail From Adress": "LevĆ©l CĆ­mről", + "Mail From Address": "LevĆ©l CĆ­mről", "Mail From Name": "LevĆ©l NĆ©vről", "Discord Client-ID": "Discord Kliens AzonosĆ­tĆ³", "Discord Client-Secret": "Discord Kliens Titok", @@ -461,4 +461,4 @@ "ru": "Orosz", "sv": "SvĆ©d", "sk": "SzlovĆ”k" -} \ No newline at end of file +} diff --git a/resources/lang/it.json b/lang/it.json similarity index 99% rename from resources/lang/it.json rename to lang/it.json index 379bad4f3..5bc51c875 100644 --- a/resources/lang/it.json +++ b/lang/it.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "sei pregato di creare un file chiamato \"install.lock\" nella cartella di Root del tuo pannello di controllo. Altrimenti non sarĆ  caricata alcun'impostazione!", "or click here": "o clicca qui", "Company Name": "Nome azienda", - "Company Adress": "Indirizzo Azienda", + "Company Address": "Indirizzo Azienda", "Company Phonenumber": "Numero di telefono dell'azienda", "VAT ID": "Partita IVA", - "Company E-Mail Adress": "E-Mail dell'azienda", + "Company E-Mail Address": "E-Mail dell'azienda", "Company Website": "Sito web dell'azienda", "Invoice Prefix": "Prefisso della Fattura", "Enable Invoices": "Attiva fatture", @@ -199,7 +199,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Tipo di cifratura Mail", - "Mail From Adress": "Mail dall'indirizzo", + "Mail From Address": "Mail dall'indirizzo", "Mail From Name": "Mail dal nome", "Discord Client-ID": "Client-ID di Discord", "Discord Client-Secret": "Client-Secret di Discord", @@ -461,4 +461,4 @@ "ru": "Russo", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/it/auth.php b/lang/it/auth.php similarity index 92% rename from resources/lang/it/auth.php rename to lang/it/auth.php index ff58e1316..897c35e3a 100644 --- a/resources/lang/it/auth.php +++ b/lang/it/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Credenziali non valide.', + 'failed' => 'Credenziali non valide.', 'password' => 'La password non ĆØ valida.', 'throttle' => 'Troppi tentativi di accesso. Riprova tra :seconds secondi.', ]; diff --git a/resources/lang/it/pagination.php b/lang/it/pagination.php similarity index 92% rename from resources/lang/it/pagination.php rename to lang/it/pagination.php index 371ac01ae..4bc78592e 100644 --- a/resources/lang/it/pagination.php +++ b/lang/it/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Successivo »', + 'next' => 'Successivo »', 'previous' => '« Precedente', ]; diff --git a/resources/lang/it/passwords.php b/lang/it/passwords.php similarity index 61% rename from resources/lang/it/passwords.php rename to lang/it/passwords.php index 4aa5b4129..5d03d8cb0 100644 --- a/resources/lang/it/passwords.php +++ b/lang/it/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'La password ĆØ stata reimpostata!', - 'sent' => 'Ti abbiamo inviato una email con il link per il reset della password!', + 'reset' => 'La password ĆØ stata reimpostata!', + 'sent' => 'Ti abbiamo inviato una email con il link per il reset della password!', 'throttled' => 'Per favore, attendi prima di riprovare.', - 'token' => 'Questo token di reset della password non ĆØ valido.', - 'user' => 'Non riusciamo a trovare un utente con questo indirizzo email.', + 'token' => 'Questo token di reset della password non ĆØ valido.', + 'user' => 'Non riusciamo a trovare un utente con questo indirizzo email.', ]; diff --git a/lang/it/validation.php b/lang/it/validation.php new file mode 100644 index 000000000..6ace1e502 --- /dev/null +++ b/lang/it/validation.php @@ -0,0 +1,135 @@ + ':attribute deve essere accettato.', + 'accepted_if' => ':attribute deve essere accettato quando :other ĆØ :value.', + 'active_url' => ':attribute non ĆØ un URL valido.', + 'after' => ':attribute deve essere una data successiva al :date.', + 'after_or_equal' => ':attribute deve essere una data successiva o uguale al :date.', + 'alpha' => ':attribute puĆ² contenere solo lettere.', + 'alpha_dash' => ':attribute puĆ² contenere solo lettere, numeri e trattini.', + 'alpha_num' => ':attribute puĆ² contenere solo lettere e numeri.', + 'array' => ':attribute deve essere un array.', + 'attached' => ':attribute ĆØ giĆ  associato.', + 'before' => ':attribute deve essere una data precedente al :date.', + 'before_or_equal' => ':attribute deve essere una data precedente o uguale al :date.', + 'between' => [ + 'array' => ':attribute deve avere tra :min - :max elementi.', + 'file' => ':attribute deve trovarsi tra :min - :max kilobyte.', + 'numeric' => ':attribute deve trovarsi tra :min - :max.', + 'string' => ':attribute deve trovarsi tra :min - :max caratteri.', + ], + 'boolean' => 'Il campo :attribute deve essere vero o falso.', + 'confirmed' => 'Il campo di conferma per :attribute non coincide.', + 'current_password' => 'Password non valida.', + 'date' => ':attribute non ĆØ una data valida.', + 'date_equals' => ':attribute deve essere una data e uguale a :date.', + 'date_format' => ':attribute non coincide con il formato :format.', + 'declined' => ':attribute deve essere rifiutato.', + 'declined_if' => ':attribute deve essere rifiutato quando :other ĆØ :value.', + 'different' => ':attribute e :other devono essere differenti.', + 'digits' => ':attribute deve essere di :digits cifre.', + 'digits_between' => ':attribute deve essere tra :min e :max cifre.', + 'dimensions' => 'Le dimensioni dell\'immagine di :attribute non sono valide.', + 'distinct' => ':attribute contiene un valore duplicato.', + 'email' => ':attribute non ĆØ valido.', + 'ends_with' => ':attribute deve finire con uno dei seguenti valori: :values', + 'exists' => ':attribute selezionato non ĆØ valido.', + 'file' => ':attribute deve essere un file.', + 'filled' => 'Il campo :attribute deve contenere un valore.', + 'gt' => [ + 'array' => ':attribute deve contenere piĆ¹ di :value elementi.', + 'file' => ':attribute deve essere maggiore di :value kilobyte.', + 'numeric' => ':attribute deve essere maggiore di :value.', + 'string' => ':attribute deve contenere piĆ¹ di :value caratteri.', + ], + 'gte' => [ + 'array' => ':attribute deve contenere un numero di elementi uguale o maggiore di :value.', + 'file' => ':attribute deve essere uguale o maggiore di :value kilobyte.', + 'numeric' => ':attribute deve essere uguale o maggiore di :value.', + 'string' => ':attribute deve contenere un numero di caratteri uguale o maggiore di :value.', + ], + 'image' => ':attribute deve essere un\'immagine.', + 'in' => ':attribute selezionato non ĆØ valido.', + 'in_array' => 'Il valore del campo :attribute non esiste in :other.', + 'integer' => ':attribute deve essere un numero intero.', + 'ip' => ':attribute deve essere un indirizzo IP valido.', + 'ipv4' => ':attribute deve essere un indirizzo IPv4 valido.', + 'ipv6' => ':attribute deve essere un indirizzo IPv6 valido.', + 'json' => ':attribute deve essere una stringa JSON valida.', + 'lt' => [ + 'array' => ':attribute deve contenere meno di :value elementi.', + 'file' => ':attribute deve essere minore di :value kilobyte.', + 'numeric' => ':attribute deve essere minore di :value.', + 'string' => ':attribute deve contenere meno di :value caratteri.', + ], + 'lte' => [ + 'array' => ':attribute deve contenere un numero di elementi minore o uguale a :value.', + 'file' => ':attribute deve essere minore o uguale a :value kilobyte.', + 'numeric' => ':attribute deve essere minore o uguale a :value.', + 'string' => ':attribute deve contenere un numero di caratteri minore o uguale a :value.', + ], + 'max' => [ + 'array' => ':attribute non puĆ² avere piĆ¹ di :max elementi.', + 'file' => ':attribute non puĆ² essere superiore a :max kilobyte.', + 'numeric' => ':attribute non puĆ² essere superiore a :max.', + 'string' => ':attribute non puĆ² contenere piĆ¹ di :max caratteri.', + ], + 'mimes' => ':attribute deve essere del tipo: :values.', + 'mimetypes' => ':attribute deve essere del tipo: :values.', + 'min' => [ + 'array' => ':attribute deve avere almeno :min elementi.', + 'file' => ':attribute deve essere almeno di :min kilobyte.', + 'numeric' => ':attribute deve essere almeno :min.', + 'string' => ':attribute deve contenere almeno :min caratteri.', + ], + 'multiple_of' => ':attribute deve essere un multiplo di :value', + 'not_in' => 'Il valore selezionato per :attribute non ĆØ valido.', + 'not_regex' => 'Il formato di :attribute non ĆØ valido.', + 'numeric' => ':attribute deve essere un numero.', + 'password' => 'Il campo :attribute non ĆØ corretto.', + 'present' => 'Il campo :attribute deve essere presente.', + 'prohibited' => ':attribute non consentito.', + 'prohibited_if' => ':attribute non consentito quando :other ĆØ :value.', + 'prohibited_unless' => ':attribute non consentito a meno che :other sia contenuto in :values.', + 'prohibits' => ':attribute impedisce a :other di essere presente.', + 'regex' => 'Il formato del campo :attribute non ĆØ valido.', + 'relatable' => ':attribute non puĆ² essere associato a questa risorsa.', + 'required' => 'Il campo :attribute ĆØ richiesto.', + 'required_if' => 'Il campo :attribute ĆØ richiesto quando :other ĆØ :value.', + 'required_unless' => 'Il campo :attribute ĆØ richiesto a meno che :other sia in :values.', + 'required_with' => 'Il campo :attribute ĆØ richiesto quando :values ĆØ presente.', + 'required_with_all' => 'Il campo :attribute ĆØ richiesto quando :values sono presenti.', + 'required_without' => 'Il campo :attribute ĆØ richiesto quando :values non ĆØ presente.', + 'required_without_all' => 'Il campo :attribute ĆØ richiesto quando nessuno di :values ĆØ presente.', + 'same' => ':attribute e :other devono coincidere.', + 'size' => [ + 'array' => ':attribute deve contenere :size elementi.', + 'file' => ':attribute deve essere :size kilobyte.', + 'numeric' => ':attribute deve essere :size.', + 'string' => ':attribute deve contenere :size caratteri.', + ], + 'starts_with' => ':attribute deve iniziare con uno dei seguenti: :values', + 'string' => ':attribute deve essere una stringa.', + 'timezone' => ':attribute deve essere una zona valida.', + 'unique' => ':attribute ĆØ stato giĆ  utilizzato.', + 'uploaded' => ':attribute non ĆØ stato caricato.', + 'url' => 'Il formato del campo :attribute non ĆØ valido.', + 'uuid' => ':attribute deve essere un UUID valido.', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], +]; diff --git a/resources/lang/nl.json b/lang/nl.json similarity index 99% rename from resources/lang/nl.json rename to lang/nl.json index fa8eeed64..5e72fc395 100644 --- a/resources/lang/nl.json +++ b/lang/nl.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "maak a.u.b. een bestand aan met de naam \"install.lock\" in de hoofdmap van uw dashboard. Anders worden er geen instellingen geladen!", "or click here": "of klik hier", "Company Name": "Bedrijfsnaam", - "Company Adress": "Bedrijfsadres", + "Company Address": "Bedrijfsadres", "Company Phonenumber": "Telefoonnummer bedrijf", "VAT ID": "Btw-nummer", - "Company E-Mail Adress": "Bedrijf e-mailadres", + "Company E-Mail Address": "Bedrijf e-mailadres", "Company Website": "Bedrijfswebsite", "Invoice Prefix": "Factuurvoorvoegsel", "Enable Invoices": "Facturen inschakelen", @@ -199,7 +199,7 @@ "Mail Username": "Mail Gebruikersnaam", "Mail Password": "Mail Wachtwoord", "Mail Encryption": "Mail Encryptie", - "Mail From Adress": "Mail van adres", + "Mail From Address": "Mail van adres", "Mail From Name": "Mail namens naam", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Russisch", "sv": "Zweeds", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/nl/auth.php b/lang/nl/auth.php similarity index 87% rename from resources/lang/nl/auth.php rename to lang/nl/auth.php index 062343fbe..d20693a91 100644 --- a/resources/lang/nl/auth.php +++ b/lang/nl/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Deze combinatie van e-mailadres en wachtwoord is niet geldig.', + 'failed' => 'Deze combinatie van e-mailadres en wachtwoord is niet geldig.', 'password' => 'Het opgegeven wachtwoord is onjuist.', 'throttle' => 'Te veel mislukte loginpogingen. Probeer het over :seconds seconden nogmaals.', ]; diff --git a/resources/lang/nl/pagination.php b/lang/nl/pagination.php similarity index 92% rename from resources/lang/nl/pagination.php rename to lang/nl/pagination.php index 1381d2b75..2c22cc71f 100644 --- a/resources/lang/nl/pagination.php +++ b/lang/nl/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Volgende »', + 'next' => 'Volgende »', 'previous' => '« Vorige', ]; diff --git a/resources/lang/nl/passwords.php b/lang/nl/passwords.php similarity index 62% rename from resources/lang/nl/passwords.php rename to lang/nl/passwords.php index c9a7a8432..f1d83bb75 100644 --- a/resources/lang/nl/passwords.php +++ b/lang/nl/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Het wachtwoord van uw account is gewijzigd.', - 'sent' => 'We hebben een e-mail verstuurd met instructies om een nieuw wachtwoord in te stellen.', + 'reset' => 'Het wachtwoord van uw account is gewijzigd.', + 'sent' => 'We hebben een e-mail verstuurd met instructies om een nieuw wachtwoord in te stellen.', 'throttled' => 'Gelieve even te wachten voor u het opnieuw probeert.', - 'token' => 'Dit wachtwoordhersteltoken is niet geldig.', - 'user' => 'Geen gebruiker bekend met het e-mailadres.', + 'token' => 'Dit wachtwoordhersteltoken is niet geldig.', + 'user' => 'Geen gebruiker bekend met het e-mailadres.', ]; diff --git a/lang/nl/validation.php b/lang/nl/validation.php new file mode 100644 index 000000000..e08ef11f9 --- /dev/null +++ b/lang/nl/validation.php @@ -0,0 +1,135 @@ + ':Attribute moet geaccepteerd zijn.', + 'accepted_if' => ':Attribute moet worden geaccepteerd als :other :value is.', + 'active_url' => ':Attribute is geen geldige URL.', + 'after' => ':Attribute moet een datum na :date zijn.', + 'after_or_equal' => ':Attribute moet een datum na of gelijk aan :date zijn.', + 'alpha' => ':Attribute mag alleen letters bevatten.', + 'alpha_dash' => ':Attribute mag alleen letters, nummers, underscores (_) en streepjes (-) bevatten.', + 'alpha_num' => ':Attribute mag alleen letters en nummers bevatten.', + 'array' => ':Attribute moet geselecteerde elementen bevatten.', + 'attached' => ':Attribute is reeds gekoppeld.', + 'before' => ':Attribute moet een datum voor :date zijn.', + 'before_or_equal' => ':Attribute moet een datum voor of gelijk aan :date zijn.', + 'between' => [ + 'array' => ':Attribute moet tussen :min en :max items bevatten.', + 'file' => ':Attribute moet tussen :min en :max kilobytes zijn.', + 'numeric' => ':Attribute moet tussen :min en :max zijn.', + 'string' => ':Attribute moet tussen :min en :max karakters zijn.', + ], + 'boolean' => ':Attribute moet ja of nee zijn.', + 'confirmed' => ':Attribute bevestiging komt niet overeen.', + 'current_password' => 'Huidig wachtwoord is onjuist.', + 'date' => ':Attribute moet een datum bevatten.', + 'date_equals' => ':Attribute moet een datum gelijk aan :date zijn.', + 'date_format' => ':Attribute moet een geldig datum formaat bevatten.', + 'declined' => ':attribute moet afgewezen worden.', + 'declined_if' => ':attribute moet afgewezen worden wanneer :other gelijk is aan :value.', + 'different' => ':Attribute en :other moeten verschillend zijn.', + 'digits' => ':Attribute moet bestaan uit :digits cijfers.', + 'digits_between' => ':Attribute moet bestaan uit minimaal :min en maximaal :max cijfers.', + 'dimensions' => ':Attribute heeft geen geldige afmetingen voor afbeeldingen.', + 'distinct' => ':Attribute heeft een dubbele waarde.', + 'email' => ':Attribute is geen geldig e-mailadres.', + 'ends_with' => ':Attribute moet met Ć©Ć©n van de volgende waarden eindigen: :values.', + 'exists' => ':Attribute bestaat niet.', + 'file' => ':Attribute moet een bestand zijn.', + 'filled' => ':Attribute is verplicht.', + 'gt' => [ + 'array' => 'De :attribute moet meer dan :value waardes bevatten.', + 'file' => 'De :attribute moet groter zijn dan :value kilobytes.', + 'numeric' => 'De :attribute moet groter zijn dan :value.', + 'string' => 'De :attribute moet meer dan :value tekens bevatten.', + ], + 'gte' => [ + 'array' => 'De :attribute moet :value waardes of meer bevatten.', + 'file' => 'De :attribute moet groter of gelijk zijn aan :value kilobytes.', + 'numeric' => 'De :attribute moet groter of gelijk zijn aan :value.', + 'string' => 'De :attribute moet minimaal :value tekens bevatten.', + ], + 'image' => ':Attribute moet een afbeelding zijn.', + 'in' => ':Attribute is ongeldig.', + 'in_array' => ':Attribute bestaat niet in :other.', + 'integer' => ':Attribute moet een getal zijn.', + 'ip' => ':Attribute moet een geldig IP-adres zijn.', + 'ipv4' => ':Attribute moet een geldig IPv4-adres zijn.', + 'ipv6' => ':Attribute moet een geldig IPv6-adres zijn.', + 'json' => ':Attribute moet een geldige JSON-string zijn.', + 'lt' => [ + 'array' => 'De :attribute moet minder dan :value waardes bevatten.', + 'file' => 'De :attribute moet kleiner zijn dan :value kilobytes.', + 'numeric' => 'De :attribute moet kleiner zijn dan :value.', + 'string' => 'De :attribute moet minder dan :value tekens bevatten.', + ], + 'lte' => [ + 'array' => 'De :attribute moet :value waardes of minder bevatten.', + 'file' => 'De :attribute moet kleiner of gelijk zijn aan :value kilobytes.', + 'numeric' => 'De :attribute moet kleiner of gelijk zijn aan :value.', + 'string' => 'De :attribute moet maximaal :value tekens bevatten.', + ], + 'max' => [ + 'array' => ':Attribute mag niet meer dan :max items bevatten.', + 'file' => ':Attribute mag niet meer dan :max kilobytes zijn.', + 'numeric' => ':Attribute mag niet hoger dan :max zijn.', + 'string' => ':Attribute mag niet uit meer dan :max tekens bestaan.', + ], + 'mimes' => ':Attribute moet een bestand zijn van het bestandstype :values.', + 'mimetypes' => ':Attribute moet een bestand zijn van het bestandstype :values.', + 'min' => [ + 'array' => ':Attribute moet minimaal :min items bevatten.', + 'file' => ':Attribute moet minimaal :min kilobytes zijn.', + 'numeric' => ':Attribute moet minimaal :min zijn.', + 'string' => ':Attribute moet minimaal :min tekens zijn.', + ], + 'multiple_of' => ':Attribute moet een veelvoud van :value zijn.', + 'not_in' => 'Het formaat van :attribute is ongeldig.', + 'not_regex' => 'De :attribute formaat is ongeldig.', + 'numeric' => ':Attribute moet een nummer zijn.', + 'password' => 'Wachtwoord is onjuist.', + 'present' => ':Attribute moet bestaan.', + 'prohibited' => ':Attribute veld is verboden.', + 'prohibited_if' => ':Attribute veld is verboden indien :other gelijk is aan :value.', + 'prohibited_unless' => ':Attribute veld is verboden tenzij :other gelijk is aan :values.', + 'prohibits' => 'Het veld :attribute verbiedt de aanwezigheid van :other.', + 'regex' => ':Attribute formaat is ongeldig.', + 'relatable' => ':Attribute mag niet gekoppeld worden aan deze bron.', + 'required' => ':Attribute is verplicht.', + 'required_if' => ':Attribute is verplicht indien :other gelijk is aan :value.', + 'required_unless' => ':Attribute is verplicht tenzij :other gelijk is aan :values.', + 'required_with' => ':Attribute is verplicht i.c.m. :values', + 'required_with_all' => ':Attribute is verplicht i.c.m. :values', + 'required_without' => ':Attribute is verplicht als :values niet ingevuld is.', + 'required_without_all' => ':Attribute is verplicht als :values niet ingevuld zijn.', + 'same' => ':Attribute en :other moeten overeenkomen.', + 'size' => [ + 'array' => ':Attribute moet :size items bevatten.', + 'file' => ':Attribute moet :size kilobyte zijn.', + 'numeric' => ':Attribute moet :size zijn.', + 'string' => ':Attribute moet :size tekens zijn.', + ], + 'starts_with' => ':Attribute moet starten met een van de volgende: :values.', + 'string' => ':Attribute moet een tekst zijn.', + 'timezone' => ':Attribute moet een geldige tijdzone zijn.', + 'unique' => ':Attribute is al in gebruik.', + 'uploaded' => 'Het uploaden van :attribute is mislukt.', + 'url' => ':Attribute moet een geldig URL zijn.', + 'uuid' => ':Attribute moet een geldig UUID zijn.', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], +]; diff --git a/resources/lang/pl.json b/lang/pl.json similarity index 99% rename from resources/lang/pl.json rename to lang/pl.json index df5538e94..14bfaee38 100644 --- a/resources/lang/pl.json +++ b/lang/pl.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "utwĆ³rz plik o nazwie ā€žinstall.lockā€ w katalogu gÅ‚Ć³wnym pulpitu nawigacyjnego. W przeciwnym razie żadne ustawienia nie zostaną załadowane!", "or click here": "lub kliknij tutaj", "Company Name": "Nazwa firmy", - "Company Adress": "Adres firmy", + "Company Address": "Adres firmy", "Company Phonenumber": "Numer telefonu", "VAT ID": "NIP", - "Company E-Mail Adress": "Firmowy adres e-mail", + "Company E-Mail Address": "Firmowy adres e-mail", "Company Website": "Strona firmy", "Invoice Prefix": "Prefiks faktury", "Enable Invoices": "Włącz faktury", @@ -199,7 +199,7 @@ "Mail Username": "Nazwa użytkownika poczty", "Mail Password": "Hasło użytkownika poczty", "Mail Encryption": "Szyfrowanie poczty", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Od Nazwy", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Rosyjski", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/pl/auth.php b/lang/pl/auth.php similarity index 92% rename from resources/lang/pl/auth.php rename to lang/pl/auth.php index 162be3c35..1873ded48 100644 --- a/resources/lang/pl/auth.php +++ b/lang/pl/auth.php @@ -12,7 +12,7 @@ */ return [ - 'failed' => 'Błędny login lub hasło.', + 'failed' => 'Błędny login lub hasło.', 'password' => 'Podane hasło jest nieprawidłowe.', 'throttle' => 'Za dużo nieudanych prĆ³b logowania. Proszę sprĆ³bować za :seconds sekund.', ]; diff --git a/resources/lang/pl/pagination.php b/lang/pl/pagination.php similarity index 92% rename from resources/lang/pl/pagination.php rename to lang/pl/pagination.php index 831b8ff6c..0e793d6b9 100644 --- a/resources/lang/pl/pagination.php +++ b/lang/pl/pagination.php @@ -12,6 +12,6 @@ */ return [ - 'next' => 'Następna »', + 'next' => 'Następna »', 'previous' => '« Poprzednia', ]; diff --git a/resources/lang/pl/passwords.php b/lang/pl/passwords.php similarity index 65% rename from resources/lang/pl/passwords.php rename to lang/pl/passwords.php index 3ea9171ea..8f6dac38b 100644 --- a/resources/lang/pl/passwords.php +++ b/lang/pl/passwords.php @@ -12,9 +12,9 @@ */ return [ - 'reset' => 'Hasło zostało zresetowane!', - 'sent' => 'Przypomnienie hasła zostało wysłane!', + 'reset' => 'Hasło zostało zresetowane!', + 'sent' => 'Przypomnienie hasła zostało wysłane!', 'throttled' => 'Proszę zaczekać zanim sprĆ³bujesz ponownie.', - 'token' => 'Token resetowania hasła jest nieprawidłowy.', - 'user' => 'Nie znaleziono użytkownika z takim adresem e-mail.', + 'token' => 'Token resetowania hasła jest nieprawidłowy.', + 'user' => 'Nie znaleziono użytkownika z takim adresem e-mail.', ]; diff --git a/lang/pl/validation.php b/lang/pl/validation.php new file mode 100644 index 000000000..fba0f778a --- /dev/null +++ b/lang/pl/validation.php @@ -0,0 +1,135 @@ + 'Pole :attribute musi zostać zaakceptowane.', + 'accepted_if' => 'Pole :attribute musi zostać zaakceptowane gdy :other ma wartość :value.', + 'active_url' => 'Pole :attribute jest nieprawidłowym adresem URL.', + 'after' => 'Pole :attribute musi być datą pĆ³Åŗniejszą od :date.', + 'after_or_equal' => 'Pole :attribute musi być datą nie wcześniejszą niż :date.', + 'alpha' => 'Pole :attribute może zawierać jedynie litery.', + 'alpha_dash' => 'Pole :attribute może zawierać jedynie litery, cyfry i myślniki.', + 'alpha_num' => 'Pole :attribute może zawierać jedynie litery i cyfry.', + 'array' => 'Pole :attribute musi być tablicą.', + 'attached' => 'Ten :attribute jest już dołączony.', + 'before' => 'Pole :attribute musi być datą wcześniejszą od :date.', + 'before_or_equal' => 'Pole :attribute musi być datą nie pĆ³Åŗniejszą niż :date.', + 'between' => [ + 'array' => 'Pole :attribute musi składać się z :min - :max elementĆ³w.', + 'file' => 'Pole :attribute musi zawierać się w granicach :min - :max kilobajtĆ³w.', + 'numeric' => 'Pole :attribute musi zawierać się w granicach :min - :max.', + 'string' => 'Pole :attribute musi zawierać się w granicach :min - :max znakĆ³w.', + ], + 'boolean' => 'Pole :attribute musi mieć wartość logiczną prawda albo fałsz.', + 'confirmed' => 'Potwierdzenie pola :attribute nie zgadza się.', + 'current_password' => 'Hasło jest nieprawidłowe.', + 'date' => 'Pole :attribute nie jest prawidłową datą.', + 'date_equals' => 'Pole :attribute musi być datą rĆ³wną :date.', + 'date_format' => 'Pole :attribute nie jest w formacie :format.', + 'declined' => 'Pole :attribute musi zostać odrzucony.', + 'declined_if' => 'Pole :attribute musi zostać odrzucony, gdy :other ma wartość :value.', + 'different' => 'Pole :attribute oraz :other muszą się rĆ³Å¼nić.', + 'digits' => 'Pole :attribute musi składać się z :digits cyfr.', + 'digits_between' => 'Pole :attribute musi mieć od :min do :max cyfr.', + 'dimensions' => 'Pole :attribute ma niepoprawne wymiary.', + 'distinct' => 'Pole :attribute ma zduplikowane wartości.', + 'email' => 'Pole :attribute nie jest poprawnym adresem e-mail.', + 'ends_with' => 'Pole :attribute musi kończyć się jedną z następujących wartości: :values.', + 'exists' => 'Zaznaczone pole :attribute jest nieprawidłowe.', + 'file' => 'Pole :attribute musi być plikiem.', + 'filled' => 'Pole :attribute nie może być puste.', + 'gt' => [ + 'array' => 'Pole :attribute musi mieć więcej niż :value elementĆ³w.', + 'file' => 'Pole :attribute musi być większe niż :value kilobajtĆ³w.', + 'numeric' => 'Pole :attribute musi być większe niż :value.', + 'string' => 'Pole :attribute musi być dłuższe niż :value znakĆ³w.', + ], + 'gte' => [ + 'array' => 'Pole :attribute musi mieć :value lub więcej elementĆ³w.', + 'file' => 'Pole :attribute musi być większe lub rĆ³wne :value kilobajtĆ³w.', + 'numeric' => 'Pole :attribute musi być większe lub rĆ³wne :value.', + 'string' => 'Pole :attribute musi być dłuższe lub rĆ³wne :value znakĆ³w.', + ], + 'image' => 'Pole :attribute musi być obrazkiem.', + 'in' => 'Zaznaczony element :attribute jest nieprawidłowy.', + 'in_array' => 'Pole :attribute nie znajduje się w :other.', + 'integer' => 'Pole :attribute musi być liczbą całkowitą.', + 'ip' => 'Pole :attribute musi być prawidłowym adresem IP.', + 'ipv4' => 'Pole :attribute musi być prawidłowym adresem IPv4.', + 'ipv6' => 'Pole :attribute musi być prawidłowym adresem IPv6.', + 'json' => 'Pole :attribute musi być poprawnym ciągiem znakĆ³w JSON.', + 'lt' => [ + 'array' => 'Pole :attribute musi mieć mniej niż :value elementĆ³w.', + 'file' => 'Pole :attribute musi być mniejsze niż :value kilobajtĆ³w.', + 'numeric' => 'Pole :attribute musi być mniejsze niż :value.', + 'string' => 'Pole :attribute musi być krĆ³tsze niż :value znakĆ³w.', + ], + 'lte' => [ + 'array' => 'Pole :attribute musi mieć :value lub mniej elementĆ³w.', + 'file' => 'Pole :attribute musi być mniejsze lub rĆ³wne :value kilobajtĆ³w.', + 'numeric' => 'Pole :attribute musi być mniejsze lub rĆ³wne :value.', + 'string' => 'Pole :attribute musi być krĆ³tsze lub rĆ³wne :value znakĆ³w.', + ], + 'max' => [ + 'array' => 'Pole :attribute nie może mieć więcej niż :max elementĆ³w.', + 'file' => 'Pole :attribute nie może być większe niż :max kilobajtĆ³w.', + 'numeric' => 'Pole :attribute nie może być większe niż :max.', + 'string' => 'Pole :attribute nie może być dłuższe niż :max znakĆ³w.', + ], + 'mimes' => 'Pole :attribute musi być plikiem typu :values.', + 'mimetypes' => 'Pole :attribute musi być plikiem typu :values.', + 'min' => [ + 'array' => 'Pole :attribute musi mieć przynajmniej :min elementĆ³w.', + 'file' => 'Pole :attribute musi mieć przynajmniej :min kilobajtĆ³w.', + 'numeric' => 'Pole :attribute musi być nie mniejsze od :min.', + 'string' => 'Pole :attribute musi mieć przynajmniej :min znakĆ³w.', + ], + 'multiple_of' => 'Pole :attribute musi być wielokrotnością wartości :value', + 'not_in' => 'Zaznaczony :attribute jest nieprawidłowy.', + 'not_regex' => 'Format pola :attribute jest nieprawidłowy.', + 'numeric' => 'Pole :attribute musi być liczbą.', + 'password' => 'Hasło jest nieprawidłowe.', + 'present' => 'Pole :attribute musi być obecne.', + 'prohibited' => 'Pole :attribute jest zabronione.', + 'prohibited_if' => 'Pole :attribute jest zabronione, gdy :other to :value.', + 'prohibited_unless' => 'Pole :attribute jest zabronione, chyba że :other jest w :values.', + 'prohibits' => 'Pole :attribute zabrania obecności :other.', + 'regex' => 'Format pola :attribute jest nieprawidłowy.', + 'relatable' => 'Ten :attribute może nie być powiązany z tym zasobem.', + 'required' => 'Pole :attribute jest wymagane.', + 'required_if' => 'Pole :attribute jest wymagane gdy :other ma wartość :value.', + 'required_unless' => 'Pole :attribute jest wymagane jeżeli :other nie znajduje się w :values.', + 'required_with' => 'Pole :attribute jest wymagane gdy :values jest obecny.', + 'required_with_all' => 'Pole :attribute jest wymagane gdy wszystkie :values są obecne.', + 'required_without' => 'Pole :attribute jest wymagane gdy :values nie jest obecny.', + 'required_without_all' => 'Pole :attribute jest wymagane gdy żadne z :values nie są obecne.', + 'same' => 'Pole :attribute i :other muszą być takie same.', + 'size' => [ + 'array' => 'Pole :attribute musi zawierać :size elementĆ³w.', + 'file' => 'Pole :attribute musi mieć :size kilobajtĆ³w.', + 'numeric' => 'Pole :attribute musi mieć :size.', + 'string' => 'Pole :attribute musi mieć :size znakĆ³w.', + ], + 'starts_with' => 'Pole :attribute musi zaczynać się jedną z następujących wartości: :values.', + 'string' => 'Pole :attribute musi być ciągiem znakĆ³w.', + 'timezone' => 'Pole :attribute musi być prawidłową strefą czasową.', + 'unique' => 'Taki :attribute już występuje.', + 'uploaded' => 'Nie udało się wgrać pliku :attribute.', + 'url' => 'Format pola :attribute jest nieprawidłowy.', + 'uuid' => 'Pole :attribute musi być poprawnym identyfikatorem UUID.', + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], +]; diff --git a/resources/lang/pt.json b/lang/pt.json similarity index 99% rename from resources/lang/pt.json rename to lang/pt.json index 2313dc326..1ce81866a 100644 --- a/resources/lang/pt.json +++ b/lang/pt.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "Favor criar um arquivo chamado \"install.lock\" no diretĆ³rio Root do seu painel. Caso contrĆ”rio, nenhuma configuraĆ§Ć£o serĆ” carregada!", "or click here": "Ou clique aqui", "Company Name": "Nome da empresa", - "Company Adress": "EndereƧo da empresa", + "Company Address": "EndereƧo da empresa", "Company Phonenumber": "NĆŗmero da empresa", "VAT ID": "ID do VAT", - "Company E-Mail Adress": "EndereƧo eletrĆ³nico da empresa", + "Company E-Mail Address": "EndereƧo eletrĆ³nico da empresa", "Company Website": "SĆ­tio ā€˜webā€™ da empresa", "Invoice Prefix": "Prefixo da fatura", "Enable Invoices": "Ativar Faturas", @@ -199,7 +199,7 @@ "Mail Username": "Utilizador de correio", "Mail Password": "Senha do correio", "Mail Encryption": "Criptografia de correio", - "Mail From Adress": "EndereƧo de correio", + "Mail From Address": "EndereƧo de correio", "Mail From Name": "Correio de Nome", "Discord Client-ID": "Cliente-ID Discord", "Discord Client-Secret": "Cliente-Secreto Discord", @@ -461,4 +461,4 @@ "ru": "Russo", "sv": "Sueco", "sk": "Eslovaco" -} \ No newline at end of file +} diff --git a/resources/lang/ro.json b/lang/ro.json similarity index 99% rename from resources/lang/ro.json rename to lang/ro.json index b897bbd07..f4c9004c1 100644 --- a/resources/lang/ro.json +++ b/lang/ro.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!", "or click here": "or click here", "Company Name": "Company Name", - "Company Adress": "Company Adress", + "Company Address": "Company Address", "Company Phonenumber": "Company Phonenumber", "VAT ID": "VAT ID", - "Company E-Mail Adress": "Company E-Mail Adress", + "Company E-Mail Address": "Company E-Mail Address", "Company Website": "Company Website", "Invoice Prefix": "Invoice Prefix", "Enable Invoices": "Enable Invoices", @@ -199,7 +199,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Russian", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/ru.json b/lang/ru.json similarity index 99% rename from resources/lang/ru.json rename to lang/ru.json index 90daf537e..68755fabd 100644 --- a/resources/lang/ru.json +++ b/lang/ru.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "ŠæŠ¾Š¶Š°Š»ŃƒŠ¹ŃŃ‚Š°, сŠ¾Š·Š“Š°Š¹Ń‚Šµ фŠ°Š¹Š» с ŠøŠ¼ŠµŠ½ŠµŠ¼ \"install.lock\" Š² ŠŗŠ¾Ń€Š½ŠµŠ²Š¾Š¼ ŠŗŠ°Ń‚Š°Š»Š¾Š³Šµ ŠæŠ°Š½ŠµŠ»Šø ŠøŠ½ŃŃ‚Ń€ŃƒŠ¼ŠµŠ½Ń‚Š¾Š². Š’ ŠæрŠ¾Ń‚ŠøŠ²Š½Š¾Š¼ сŠ»ŃƒŃ‡Š°Šµ Š½ŠøŠŗŠ°ŠŗŠøŠµ Š½Š°ŃŃ‚Ń€Š¾Š¹ŠŗŠø Š½Šµ Š±ŃƒŠ“ут Š·Š°Š³Ń€ŃƒŠ¶ŠµŠ½Ń‹!", "or click here": "Š½Š°Š¶Š¼ŠøтŠµ Š·Š“ŠµŃŃŒ", "Company Name": "ŠŠ°Š·Š²Š°Š½ŠøŠµ ŠšŠ¾Š¼ŠæŠ°Š½ŠøŠø", - "Company Adress": "ŠšŠ¾Š½Ń‚Š°ŠŗтŠ½Ń‹Š¹ Š°Š“рŠµŃ ŠŗŠ¾Š¼ŠæŠ°Š½ŠøŠø", + "Company Address": "ŠšŠ¾Š½Ń‚Š°ŠŗтŠ½Ń‹Š¹ Š°Š“рŠµŃ ŠŗŠ¾Š¼ŠæŠ°Š½ŠøŠø", "Company Phonenumber": "ŠšŠ¾Š½Ń‚Š°ŠŗтŠ½Ń‹Š¹ тŠµŠ»ŠµŃ„Š¾Š½ ŠŗŠ¾Š¼ŠæŠ°Š½ŠøŠø", "VAT ID": "Š˜ŠŠ", - "Company E-Mail Adress": "ŠŠ“рŠµŃ эŠ»ŠµŠŗтрŠ¾Š½Š½Š¾Š¹ ŠæŠ¾Ń‡Ń‚Ń‹ ŠŗŠ¾Š¼ŠæŠ°Š½ŠøŠø", + "Company E-Mail Address": "ŠŠ“рŠµŃ эŠ»ŠµŠŗтрŠ¾Š½Š½Š¾Š¹ ŠæŠ¾Ń‡Ń‚Ń‹ ŠŗŠ¾Š¼ŠæŠ°Š½ŠøŠø", "Company Website": "Š”Š°Š¹Ń‚ ŠŗŠ¾Š¼ŠæŠ°Š½ŠøŠø", "Invoice Prefix": "ŠŸŃ€ŠµŃ„ŠøŠŗс счŠµŃ‚Š°-фŠ°Šŗтуры", "Enable Invoices": "Š’ŠŗŠ»ŃŽŃ‡Šøть счŠµŃ‚Š°", @@ -199,7 +199,7 @@ "Mail Username": "Š˜Š¼Ń ŠæŠ¾Š»ŃŒŠ·Š¾Š²Š°Ń‚ŠµŠ»Ń", "Mail Password": "ŠŸŠ¾Ń‡Ń‚Š¾Š²Ń‹Š¹ ŠæŠ°Ń€Š¾Š»ŃŒ", "Mail Encryption": "Š¢ŠøŠæ шŠøфрŠ¾Š²Š°Š½Šøя (SSL)", - "Mail From Adress": "ŠŸŠ¾Ń‡Ń‚Š° с Š°Š“рŠµŃŠ°", + "Mail From Address": "ŠŸŠ¾Ń‡Ń‚Š° с Š°Š“рŠµŃŠ°", "Mail From Name": "Š˜Š¼Ń Š¾Ń‚ŠæрŠ°Š²ŠøтŠµŠ»Ń", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Š ŃƒŃŃŠŗŠøŠ¹", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/sh.json b/lang/sh.json similarity index 99% rename from resources/lang/sh.json rename to lang/sh.json index 56c63ac36..2755ad282 100644 --- a/resources/lang/sh.json +++ b/lang/sh.json @@ -160,10 +160,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!", "or click here": "or click here", "Company Name": "Company Name", - "Company Adress": "Company Adress", + "Company Address": "Company Address", "Company Phonenumber": "Company Phonenumber", "VAT ID": "VAT ID", - "Company E-Mail Adress": "Company E-Mail Adress", + "Company E-Mail Address": "Company E-Mail Address", "Company Website": "Company Website", "Invoice Prefix": "Invoice Prefix", "Enable Invoices": "Enable Invoices", @@ -185,7 +185,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -442,4 +442,4 @@ "zh": "Chinese", "tr": "Turkish", "ru": "Russian" -} \ No newline at end of file +} diff --git a/resources/lang/sk.json b/lang/sk.json similarity index 99% rename from resources/lang/sk.json rename to lang/sk.json index f002840db..136d498de 100644 --- a/resources/lang/sk.json +++ b/lang/sk.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!", "or click here": "or click here", "Company Name": "Company Name", - "Company Adress": "Company Adress", + "Company Address": "Company Address", "Company Phonenumber": "Company Phonenumber", "VAT ID": "VAT ID", - "Company E-Mail Adress": "Company E-Mail Adress", + "Company E-Mail Address": "Company E-Mail Address", "Company Website": "Company Website", "Invoice Prefix": "Invoice Prefix", "Enable Invoices": "Enable Invoices", @@ -199,7 +199,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Russian", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/sr.json b/lang/sr.json similarity index 99% rename from resources/lang/sr.json rename to lang/sr.json index 0c51bf979..6e23c5260 100644 --- a/resources/lang/sr.json +++ b/lang/sr.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "molimo napravite fajl sa nazivom \"install.lock\" u glavnom direktoriju svoje kontrolne table inače niti jedno podeÅ”avanje neće biti učitano!", "or click here": "ili kliknite ovdje", "Company Name": "Naziv firme", - "Company Adress": "Kontakt adresa", + "Company Address": "Kontakt adresa", "Company Phonenumber": "Telefonski broj firme", "VAT ID": "Poreski identifikacioni broj (PIB)", - "Company E-Mail Adress": "E-Mail adresa firme", + "Company E-Mail Address": "E-Mail adresa firme", "Company Website": "Web portal firme", "Invoice Prefix": "Prefiks faktura", "Enable Invoices": "Aktiviraj fakture", @@ -199,7 +199,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Russian", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/sv.json b/lang/sv.json similarity index 99% rename from resources/lang/sv.json rename to lang/sv.json index f6a377f12..805887ef8 100644 --- a/resources/lang/sv.json +++ b/lang/sv.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "var vƤnlig och skapa en fil som heter \"install.lock\" i din panels huvudmapp. Annars kommer inga instƤllningar att laddas!", "or click here": "eller klicka hƤr", "Company Name": "Fƶretagsnamn", - "Company Adress": "Fƶretagsadress", + "Company Address": "Fƶretagsadress", "Company Phonenumber": "Fƶretags telefonnummer", "VAT ID": "Momsreg. nr.", - "Company E-Mail Adress": "Fƶretagsepost", + "Company E-Mail Address": "Fƶretagsepost", "Company Website": "Fƶretagets Hemsida", "Invoice Prefix": "Prefix fƶr fakturor", "Enable Invoices": "Aktivera fakturor", @@ -199,7 +199,7 @@ "Mail Username": "Mail Username", "Mail Password": "Mail Password", "Mail Encryption": "Mail Encryption", - "Mail From Adress": "Mail From Adress", + "Mail From Address": "Mail From Address", "Mail From Name": "Mail From Name", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "Russian", "sv": "Swedish", "sk": "Slovakish" -} \ No newline at end of file +} diff --git a/resources/lang/tr.json b/lang/tr.json similarity index 99% rename from resources/lang/tr.json rename to lang/tr.json index 385a8dffb..f712fd680 100644 --- a/resources/lang/tr.json +++ b/lang/tr.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "lĆ¼tfen ana klasƶrde \"install.lock\" adında bir dosya oluşturun yoksa hiƧbir ayar yĆ¼klenmeyecek!", "or click here": "veya buraya tıklayın", "Company Name": "Firma Adı", - "Company Adress": "Firma Adresi", + "Company Address": "Firma Adresi", "Company Phonenumber": "Firma Telefon numarası", "VAT ID": "Vergi kimlik numarası", - "Company E-Mail Adress": "Firma e-posta adresi", + "Company E-Mail Address": "Firma e-posta adresi", "Company Website": "Firma Web Sitesi", "Invoice Prefix": "Fatura ƶneki", "Enable Invoices": "Faturalandırmayı Etkinleştir", @@ -199,7 +199,7 @@ "Mail Username": "Posta Kullanıcı Adı", "Mail Password": "Posta Parolası", "Mail Encryption": "Posta şifrelemesi", - "Mail From Adress": "Posta gƶnderen adresi", + "Mail From Address": "Posta gƶnderen adresi", "Mail From Name": "Posta gƶnderen ismi", "Discord Client-ID": "Discord client id'si", "Discord Client-Secret": "Discord Client Secret'ı", @@ -461,4 +461,4 @@ "ru": "RusƧa", "sv": "Ä°sveƧƧe", "sk": "SlovakƧa" -} \ No newline at end of file +} diff --git a/resources/lang/zh.json b/lang/zh.json similarity index 99% rename from resources/lang/zh.json rename to lang/zh.json index efae58c6e..0e665123e 100644 --- a/resources/lang/zh.json +++ b/lang/zh.json @@ -174,10 +174,10 @@ "please create a file called \"install.lock\" in your dashboard Root directory. Otherwise no settings will be loaded!": "čÆ·åœØä½ ēš„Dashboardę ¹ē›®å½•äø‹åˆ›å»ŗäø€äøŖ名äøŗ \"install.lock \"ēš„ꖇ件ļ¼Œå¦åˆ™å°†ę— ę³•åŠ č½½ä»»ä½•č®¾ē½®!", "or click here": "ꈖē‚¹å‡»ę­¤å¤„", "Company Name": "公åø名ē§°", - "Company Adress": "公åø地址", + "Company Address": "公åø地址", "Company Phonenumber": "公åøē”µčƝ号ē ", "VAT ID": "增值ē؎号", - "Company E-Mail Adress": "公åøē”µé‚®", + "Company E-Mail Address": "公åøē”µé‚®", "Company Website": "公åøē½‘ē«™", "Invoice Prefix": "发ē„Ø号前ē¼€", "Enable Invoices": "åÆē”Ø发ē„Ø", @@ -199,7 +199,7 @@ "Mail Username": "ē”µé‚®ęœåŠ”å™Øē”Øęˆ·å", "Mail Password": "ē”µé‚®ęœåŠ”å™ØåƆē ", "Mail Encryption": "ē”µé‚®ęœåŠ”å™Ø加åÆ†ę–¹ę³•", - "Mail From Adress": "å‘é€č€…é‚®ē®±", + "Mail From Address": "å‘é€č€…é‚®ē®±", "Mail From Name": "å‘é€č€…åē§°", "Discord Client-ID": "Discord Client-ID", "Discord Client-Secret": "Discord Client-Secret", @@ -461,4 +461,4 @@ "ru": "äæ„čÆ­", "sv": "乌克兰čÆ­", "sk": "ę–Æę“›ä¼å…‹čÆ­" -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index e9cdc1474..632f719ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,20 +1,23 @@ { - "name": "controllpanelgg", + "name": "dashboard", "lockfileVersion": 2, "requires": true, "packages": { "": { + "dependencies": { + "tinymce": "^6.3.1" + }, "devDependencies": { - "axios": "^0.21", - "bootstrap": "^4.0.0", - "jquery": "^3.2", + "axios": "^0.25", + "bootstrap": "^4.6.0", + "jquery": "^3.5", "laravel-mix": "^6.0.6", "lodash": "^4.17.19", - "popper.js": "^1.12", + "popper.js": "^1.16", "postcss": "^8.1.14", "resolve-url-loader": "^3.1.2", - "sass": "^1.15.2", - "sass-loader": "^8.0.0" + "sass": "^1.32.1", + "sass-loader": "^10.1.1" } }, "node_modules/@babel/code-frame": { @@ -1633,9 +1636,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "node_modules/@types/micromatch": { @@ -2262,12 +2265,12 @@ } }, "node_modules/axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", "dev": true, "dependencies": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.7" } }, "node_modules/babel-loader": { @@ -5454,9 +5457,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", - "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true, "funding": [ { @@ -11728,19 +11731,19 @@ } }, "node_modules/sass-loader": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz", - "integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz", + "integrity": "sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ==", "dev": true, "dependencies": { - "clone-deep": "^4.0.1", - "loader-utils": "^1.2.3", - "neo-async": "^2.6.1", - "schema-utils": "^2.6.1", - "semver": "^6.3.0" + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0", + "semver": "^7.3.2" }, "engines": { - "node": ">= 8.9.0" + "node": ">= 10.13.0" }, "funding": { "type": "opencollective", @@ -11748,7 +11751,7 @@ }, "peerDependencies": { "fibers": ">= 3.1.0", - "node-sass": "^4.0.0", + "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", "sass": "^1.3.0", "webpack": "^4.36.0 || ^5.0.0" }, @@ -11764,13 +11767,51 @@ } } }, + "node_modules/sass-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/sass-loader/node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/sass-loader/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/sax": { @@ -12829,6 +12870,11 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, + "node_modules/tinymce": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.3.1.tgz", + "integrity": "sha512-+oCwXuTxAdJXVJ0130OxQz0JDNsqg3deuzgeUo8X5Vb27EzCJgXwO5eWvCxvkxpQo4oiHMVlM4tUIpTUHufHGQ==" + }, "node_modules/to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -15169,9 +15215,9 @@ } }, "@types/json-schema": { - "version": "7.0.7", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", - "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==", + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, "@types/micromatch": { @@ -15705,12 +15751,12 @@ } }, "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz", + "integrity": "sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==", "dev": true, "requires": { - "follow-redirects": "^1.10.0" + "follow-redirects": "^1.14.7" } }, "babel-loader": { @@ -18293,9 +18339,9 @@ } }, "follow-redirects": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", - "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "dev": true }, "for-in": { @@ -23134,23 +23180,48 @@ } }, "sass-loader": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-8.0.2.tgz", - "integrity": "sha512-7o4dbSK8/Ol2KflEmSco4jTjQoV988bM82P9CZdmo9hR3RLnvNc0ufMNdMrB0caq38JQ/FgF4/7RcbcfKzxoFQ==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-10.4.1.tgz", + "integrity": "sha512-aX/iJZTTpNUNx/OSYzo2KsjIUQHqvWsAhhUijFjAPdZTEhstjZI9zTNvkTTwsx+uNUJqUwOw5gacxQMx4hJxGQ==", "dev": true, "requires": { - "clone-deep": "^4.0.1", - "loader-utils": "^1.2.3", - "neo-async": "^2.6.1", - "schema-utils": "^2.6.1", - "semver": "^6.3.0" + "klona": "^2.0.4", + "loader-utils": "^2.0.0", + "neo-async": "^2.6.2", + "schema-utils": "^3.0.0", + "semver": "^7.3.2" }, "dependencies": { + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } } } }, @@ -24035,6 +24106,11 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, + "tinymce": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.3.1.tgz", + "integrity": "sha512-+oCwXuTxAdJXVJ0130OxQz0JDNsqg3deuzgeUo8X5Vb27EzCJgXwO5eWvCxvkxpQo4oiHMVlM4tUIpTUHufHGQ==" + }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", diff --git a/package.json b/package.json index 331b12d4f..1e38ffe3d 100644 --- a/package.json +++ b/package.json @@ -7,18 +7,25 @@ "watch-poll": "mix watch -- --watch-options-poll=1000", "hot": "mix watch --hot", "prod": "npm run production", - "production": "mix --production" + "production": "mix --production", + "dev:default": "vite --config themes/default/vite.config.js", + "build:default": "vite build --config themes/default/vite.config.js", + "dev:1day2die": "vite --config themes/1day2die/vite.config.js", + "build:1day2die": "vite build --config themes/1day2die/vite.config.js" }, "devDependencies": { - "axios": "^0.21", - "bootstrap": "^4.0.0", - "jquery": "^3.2", + "axios": "^0.25", + "bootstrap": "^4.6.0", + "jquery": "^3.5", "laravel-mix": "^6.0.6", "lodash": "^4.17.19", - "popper.js": "^1.12", + "popper.js": "^1.16", "postcss": "^8.1.14", "resolve-url-loader": "^3.1.2", - "sass": "^1.15.2", - "sass-loader": "^8.0.0" + "sass": "^1.32.1", + "sass-loader": "^10.1.1" + }, + "dependencies": { + "tinymce": "^6.3.1" } } diff --git a/phpunit.xml b/phpunit.xml index 1581b5980..fc15f97bc 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -18,15 +18,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/public/images/paypal_logo.png b/public/images/Extensions/PaymentGateways/paypal_logo.png similarity index 100% rename from public/images/paypal_logo.png rename to public/images/Extensions/PaymentGateways/paypal_logo.png diff --git a/public/images/stripe_logo.png b/public/images/Extensions/PaymentGateways/stripe_logo.png similarity index 100% rename from public/images/stripe_logo.png rename to public/images/Extensions/PaymentGateways/stripe_logo.png diff --git a/public/index.php b/public/index.php index a8137b13a..1d69f3a28 100644 --- a/public/index.php +++ b/public/index.php @@ -7,17 +7,17 @@ /* |-------------------------------------------------------------------------- -| Check If Application Is Under Maintenance +| Check If The Application Is Under Maintenance |-------------------------------------------------------------------------- | -| If the application is maintenance / demo mode via the "down" command we -| will require this file so that any prerendered template can be shown +| If the application is in maintenance / demo mode via the "down" command +| we will load this file so that any pre-rendered content can be shown | instead of starting the framework, which could cause an exception. | */ -if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) { - require __DIR__.'/../storage/framework/maintenance.php'; +if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) { + require $maintenance; } /* @@ -48,8 +48,8 @@ $kernel = $app->make(Kernel::class); -$response = tap($kernel->handle( +$response = $kernel->handle( $request = Request::capture() -))->send(); +)->send(); $kernel->terminate($request, $response); diff --git a/public/install/dotenv.php b/public/install/dotenv.php index 01a94658a..40455ad76 100644 --- a/public/install/dotenv.php +++ b/public/install/dotenv.php @@ -11,10 +11,9 @@ class DotEnv */ protected $path; - public function __construct(string $path) { - if (!file_exists($path)) { + if (! file_exists($path)) { throw new \InvalidArgumentException(sprintf('%s does not exist', $path)); } $this->path = $path; @@ -22,22 +21,21 @@ public function __construct(string $path) public function load(): void { - if (!is_readable($this->path)) { + if (! is_readable($this->path)) { throw new \RuntimeException(sprintf('%s file is not readable', $this->path)); } $lines = file($this->path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach ($lines as $line) { - if (strpos(trim($line), '#') === 0) { continue; } - list($name, $value) = explode('=', $line, 2); + [$name, $value] = explode('=', $line, 2); $name = trim($name); $value = trim($value); - if (!array_key_exists($name, $_SERVER) && !array_key_exists($name, $_ENV)) { + if (! array_key_exists($name, $_SERVER) && ! array_key_exists($name, $_ENV)) { putenv(sprintf('%s=%s', $name, $value)); $_ENV[$name] = $value; $_SERVER[$name] = $value; @@ -45,4 +43,3 @@ public function load(): void } } } - diff --git a/public/install/forms.php b/public/install/forms.php index bb0bdd7de..980ee3ceb 100644 --- a/public/install/forms.php +++ b/public/install/forms.php @@ -9,89 +9,77 @@ require 'phpmailer/PHPMailer.php'; require 'phpmailer/SMTP.php'; +(new DotEnv(dirname(__FILE__, 3).'/.env'))->load(); -(new DotEnv(dirname(__FILE__, 3) . "/.env"))->load(); - -include("functions.php"); +include 'functions.php'; if (isset($_POST['checkDB'])) { - $values = [ //SETTINGS::VALUE => REQUEST-VALUE (coming from the html-form) - "DB_HOST" => "databasehost", - "DB_DATABASE" => "database", - "DB_USERNAME" => "databaseuser", - "DB_PASSWORD" => "databaseuserpass", - "DB_PORT" => "databaseport", - "DB_CONNECTION" => "databasedriver" + 'DB_HOST' => 'databasehost', + 'DB_DATABASE' => 'database', + 'DB_USERNAME' => 'databaseuser', + 'DB_PASSWORD' => 'databaseuserpass', + 'DB_PORT' => 'databaseport', + 'DB_CONNECTION' => 'databasedriver', ]; - - $db = new mysqli($_POST["databasehost"], $_POST["databaseuser"], $_POST["databaseuserpass"], $_POST["database"], $_POST["databaseport"]); + $db = new mysqli($_POST['databasehost'], $_POST['databaseuser'], $_POST['databaseuserpass'], $_POST['database'], $_POST['databaseport']); if ($db->connect_error) { wh_log($db->connect_error); - header("LOCATION: index.php?step=2&message=Could not connect to the Database"); - die(); + header('LOCATION: index.php?step=2&message=Could not connect to the Database'); + exit(); } foreach ($values as $key => $value) { $param = $_POST[$value]; - # if ($key == "DB_PASSWORD") { - # $param = '"' . $_POST[$value] . '"'; - # } + // if ($key == "DB_PASSWORD") { + // $param = '"' . $_POST[$value] . '"'; + // } setEnvironmentValue($key, $param); } - header("LOCATION: index.php?step=2.5"); - + header('LOCATION: index.php?step=2.5'); } - if (isset($_POST['checkGeneral'])) { - - - $appname = '"' . $_POST['name'] . '"'; + $appname = '"'.$_POST['name'].'"'; $appurl = $_POST['url']; - if (substr($appurl, -1) === "/") { - $appurl = substr_replace($appurl, "", -1); + if (substr($appurl, -1) === '/') { + $appurl = substr_replace($appurl, '', -1); } + setEnvironmentValue('APP_NAME', $appname); + setEnvironmentValue('APP_URL', $appurl); - setEnvironmentValue("APP_NAME", $appname); - setEnvironmentValue("APP_URL", $appurl); - - header("LOCATION: index.php?step=4"); - + header('LOCATION: index.php?step=4'); } if (isset($_POST['feedDB'])) { - $logs = ""; + $logs = ''; - #$logs .= run_console(putenv('COMPOSER_HOME=' . dirname(__FILE__, 3) . '/vendor/bin/composer')); - #$logs .= run_console('composer install --no-dev --optimize-autoloader'); + //$logs .= run_console(putenv('COMPOSER_HOME=' . dirname(__FILE__, 3) . '/vendor/bin/composer')); + //$logs .= run_console('composer install --no-dev --optimize-autoloader'); $logs .= run_console('php artisan migrate --seed --force'); $logs .= run_console('php artisan db:seed --class=ExampleItemsSeeder --force'); - if (strpos(getEnvironmentValue("APP_KEY"), 'base64') === false) { + if (strpos(getEnvironmentValue('APP_KEY'), 'base64') === false) { $logs .= run_console('php artisan key:generate --force'); - }else{ - $logs .= "Key already exists. Skipping\n"; + } else { + $logs .= "Key already exists. Skipping\n"; } $logs .= run_console('php artisan storage:link'); wh_log($logs); - if (strpos(getEnvironmentValue("APP_KEY"), 'base64') !== false) { - header("LOCATION: index.php?step=3"); + if (strpos(getEnvironmentValue('APP_KEY'), 'base64') !== false) { + header('LOCATION: index.php?step=3'); } else { - header("LOCATION: index.php?step=2.5&message=There was an error. Please check the .txt file in /var/www/controlpanel/public/install/logs !"); + header('LOCATION: index.php?step=2.5&message=There was an error. Please check the .txt file in /var/www/controlpanel/public/install/logs !'); } - - } if (isset($_POST['checkSMTP'])) { - try { $mail = new PHPMailer(true); @@ -111,39 +99,36 @@ // Content $mail->isHTML(true); // Set email format to HTML $mail->Subject = 'It Worked!'; - $mail->Body = "Your E-Mail Settings are correct!"; - + $mail->Body = 'Your E-Mail Settings are correct!'; $mail->send(); } catch (Exception $e) { - header("LOCATION: index.php?step=4&message=Something wasnt right when sending the E-Mail!"); - die(); + header('LOCATION: index.php?step=4&message=Something wasnt right when sending the E-Mail!'); + exit(); } - $db = new mysqli(getEnvironmentValue("DB_HOST"), getEnvironmentValue("DB_USERNAME"), getEnvironmentValue("DB_PASSWORD"), getEnvironmentValue("DB_DATABASE"), getEnvironmentValue("DB_PORT")); + $db = new mysqli(getEnvironmentValue('DB_HOST'), getEnvironmentValue('DB_USERNAME'), getEnvironmentValue('DB_PASSWORD'), getEnvironmentValue('DB_DATABASE'), getEnvironmentValue('DB_PORT')); if ($db->connect_error) { wh_log($db->connect_error); - header("LOCATION: index.php?step=4&message=Could not connect to the Database: "); - die(); + header('LOCATION: index.php?step=4&message=Could not connect to the Database: '); + exit(); } $values = [ - "SETTINGS::MAIL:MAILER" => $_POST["method"], - "SETTINGS::MAIL:HOST" => $_POST["host"], - "SETTINGS::MAIL:PORT" => $_POST["port"], - "SETTINGS::MAIL:USERNAME" => $_POST["user"], - "SETTINGS::MAIL:PASSWORD" => $_POST["pass"], - "SETTINGS::MAIL:ENCRYPTION" => $_POST["encryption"], - "SETTINGS::MAIL:FROM_ADDRESS" => $_POST["user"] + 'SETTINGS::MAIL:MAILER' => $_POST['method'], + 'SETTINGS::MAIL:HOST' => $_POST['host'], + 'SETTINGS::MAIL:PORT' => $_POST['port'], + 'SETTINGS::MAIL:USERNAME' => $_POST['user'], + 'SETTINGS::MAIL:PASSWORD' => $_POST['pass'], + 'SETTINGS::MAIL:ENCRYPTION' => $_POST['encryption'], + 'SETTINGS::MAIL:FROM_ADDRESS' => $_POST['user'], ]; foreach ($values as $key => $value) { - $query = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$value' WHERE (`key` = '$key')"; + $query = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$value' WHERE (`key` = '$key')"; $db->query($query); } - header("LOCATION: index.php?step=5"); - - + header('LOCATION: index.php?step=5'); } if (isset($_POST['checkPtero'])) { @@ -151,163 +136,143 @@ $key = $_POST['key']; $clientkey = $_POST['clientkey']; - if (substr($url, -1) === "/") { - $url = substr_replace($url, "", -1); + if (substr($url, -1) === '/') { + $url = substr_replace($url, '', -1); } - $callpteroURL = $url . "/api/client/account"; + $callpteroURL = $url.'/api/client/account'; $call = curl_init(); curl_setopt($call, CURLOPT_URL, $callpteroURL); curl_setopt($call, CURLOPT_RETURNTRANSFER, true); - curl_setopt($call, CURLOPT_HTTPHEADER, array( - "Accept: application/json", - "Content-Type: application/json", - "Authorization: Bearer " . $clientkey - )); + curl_setopt($call, CURLOPT_HTTPHEADER, [ + 'Accept: application/json', + 'Content-Type: application/json', + 'Authorization: Bearer '.$clientkey, + ]); $callresponse = curl_exec($call); $callresult = json_decode($callresponse, true); curl_close($call); // Close the connection - - - - $pteroURL = $url . "/api/application/users"; + $pteroURL = $url.'/api/application/users'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $pteroURL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - "Accept: application/json", - "Content-Type: application/json", - "Authorization: Bearer " . $key - )); + curl_setopt($ch, CURLOPT_HTTPHEADER, [ + 'Accept: application/json', + 'Content-Type: application/json', + 'Authorization: Bearer '.$key, + ]); $response = curl_exec($ch); $result = json_decode($response, true); curl_close($ch); // Close the connection - - if (!is_array($result) or in_array($result["errors"][0]["code"], $result)) { - header("LOCATION: index.php?step=5&message=Couldnt connect to Pterodactyl. Make sure your API key has all read and write permissions!"); - wh_log("API CALL ERROR: ".$result["errors"][0]["code"]); - die(); - }elseif (!is_array($callresult) or in_array($result["errors"][0]["code"], $result) or $callresult["attributes"]["admin"] == false) { - header("LOCATION: index.php?step=5&message=Your ClientAPI Key is wrong or the account is not an admin!"); - wh_log("API CALL ERROR: ".$result["errors"][0]["code"]); - die(); + if (! is_array($result) or in_array($result['errors'][0]['code'], $result)) { + header('LOCATION: index.php?step=5&message=Couldnt connect to Pterodactyl. Make sure your API key has all read and write permissions!'); + wh_log('API CALL ERROR: '.$result['errors'][0]['code']); + exit(); + } elseif (! is_array($callresult) or in_array($result['errors'][0]['code'], $result) or $callresult['attributes']['admin'] == false) { + header('LOCATION: index.php?step=5&message=Your ClientAPI Key is wrong or the account is not an admin!'); + wh_log('API CALL ERROR: '.$result['errors'][0]['code']); + exit(); } else { + $query1 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$url' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL')"; + $query2 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$key' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN')"; + $query3 = 'UPDATE `'.getEnvironmentValue('DB_DATABASE')."`.`settings` SET `value` = '$clientkey' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN')"; - $query1 = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$url' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL')"; - $query2 = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$key' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN')"; - $query3 = "UPDATE `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` SET `value` = '$clientkey' WHERE (`key` = 'SETTINGS::SYSTEM:PTERODACTYL:ADMIN_USER_TOKEN')"; - - - $db = new mysqli(getEnvironmentValue("DB_HOST"), getEnvironmentValue("DB_USERNAME"), getEnvironmentValue("DB_PASSWORD"), getEnvironmentValue("DB_DATABASE"), getEnvironmentValue("DB_PORT")); + $db = new mysqli(getEnvironmentValue('DB_HOST'), getEnvironmentValue('DB_USERNAME'), getEnvironmentValue('DB_PASSWORD'), getEnvironmentValue('DB_DATABASE'), getEnvironmentValue('DB_PORT')); if ($db->connect_error) { wh_log($db->connect_error); - header("LOCATION: index.php?step=5&message=Could not connect to the Database"); - die(); + header('LOCATION: index.php?step=5&message=Could not connect to the Database'); + exit(); } if ($db->query($query1) && $db->query($query2) && $db->query($query3)) { - header("LOCATION: index.php?step=6"); + header('LOCATION: index.php?step=6'); } else { wh_log($db->error); - header("LOCATION: index.php?step=5&message=Something went wrong when communicating with the Database!"); + header('LOCATION: index.php?step=5&message=Something went wrong when communicating with the Database!'); } } - - } if (isset($_POST['createUser'])) { - $db = new mysqli(getEnvironmentValue("DB_HOST"), getEnvironmentValue("DB_USERNAME"), getEnvironmentValue("DB_PASSWORD"), getEnvironmentValue("DB_DATABASE"), getEnvironmentValue("DB_PORT")); + $db = new mysqli(getEnvironmentValue('DB_HOST'), getEnvironmentValue('DB_USERNAME'), getEnvironmentValue('DB_PASSWORD'), getEnvironmentValue('DB_DATABASE'), getEnvironmentValue('DB_PORT')); if ($db->connect_error) { wh_log($db->connect_error); - header("LOCATION: index.php?step=6&message=Could not connect to the Database"); - die(); + header('LOCATION: index.php?step=6&message=Could not connect to the Database'); + exit(); } - $pteroID = $_POST['pteroID']; $pass = $_POST['pass']; $repass = $_POST['repass']; - $key = $db->query("SELECT `value` FROM `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN'")->fetch_assoc(); - $pterobaseurl = $db->query("SELECT `value` FROM `" . getEnvironmentValue("DB_DATABASE") . "`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL'")->fetch_assoc(); - - + $key = $db->query('SELECT `value` FROM `'.getEnvironmentValue('DB_DATABASE')."`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:TOKEN'")->fetch_assoc(); + $pterobaseurl = $db->query('SELECT `value` FROM `'.getEnvironmentValue('DB_DATABASE')."`.`settings` WHERE `key` = 'SETTINGS::SYSTEM:PTERODACTYL:URL'")->fetch_assoc(); - $pteroURL = $pterobaseurl["value"] . "/api/application/users/" . $pteroID; + $pteroURL = $pterobaseurl['value'].'/api/application/users/'.$pteroID; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $pteroURL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - "Accept: application/json", - "Content-Type: application/json", - "Authorization: Bearer " . $key["value"] - )); + curl_setopt($ch, CURLOPT_HTTPHEADER, [ + 'Accept: application/json', + 'Content-Type: application/json', + 'Authorization: Bearer '.$key['value'], + ]); $response = curl_exec($ch); $result = json_decode($response, true); curl_close($ch); // Close the connection - if (!$result["attributes"]["email"]) { - header("LOCATION: index.php?step=6&message=Could not find the user with pterodactyl ID ".$pteroID); - die(); + if (! $result['attributes']['email']) { + header('LOCATION: index.php?step=6&message=Could not find the user with pterodactyl ID '.$pteroID); + exit(); } if ($pass !== $repass) { - header("LOCATION: index.php?step=6&message=The Passwords did not match!"); - die(); + header('LOCATION: index.php?step=6&message=The Passwords did not match!'); + exit(); } - $mail = $result["attributes"]["email"]; - $name = $result["attributes"]["username"]; + $mail = $result['attributes']['email']; + $name = $result['attributes']['username']; $pass = password_hash($pass, PASSWORD_DEFAULT); - $pteroURL = $pterobaseurl["value"] . "/api/application/users/" . $pteroID; + $pteroURL = $pterobaseurl['value'].'/api/application/users/'.$pteroID; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $pteroURL); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - curl_setopt($ch, CURLOPT_HTTPHEADER, array( - "Accept: application/json", - "Content-Type: application/json", - "Authorization: Bearer " . $key["value"] - )); - curl_setopt($ch, CURLOPT_POSTFIELDS, array( - "email" => $mail, - "username" => $name, - "first_name" => $name, - "last_name" => $name, - "password" => $pass - )); + curl_setopt($ch, CURLOPT_HTTPHEADER, [ + 'Accept: application/json', + 'Content-Type: application/json', + 'Authorization: Bearer '.$key['value'], + ]); + curl_setopt($ch, CURLOPT_POSTFIELDS, [ + 'email' => $mail, + 'username' => $name, + 'first_name' => $name, + 'last_name' => $name, + 'password' => $pass, + ]); $response = curl_exec($ch); $result = json_decode($response, true); curl_close($ch); // Close the connection - if (!is_array($result) or in_array($result["errors"][0]["code"], $result)) { - header("LOCATION: index.php?step=5&message=Couldnt connect to Pterodactyl. Make sure your API key has all read and write permissions!"); - die(); + if (! is_array($result) or in_array($result['errors'][0]['code'], $result)) { + header('LOCATION: index.php?step=5&message=Couldnt connect to Pterodactyl. Make sure your API key has all read and write permissions!'); + exit(); } - $random = generateRandomString(); - $query1 = "INSERT INTO `" . getEnvironmentValue("DB_DATABASE") . "`.`users` (`name`, `role`, `credits`, `server_limit`, `pterodactyl_id`, `email`, `password`, `created_at`, `referral_code`) VALUES ('$name', 'admin', '250', '1', '$pteroID', '$mail', '$pass', CURRENT_TIMESTAMP, '$random')"; - - + $query1 = 'INSERT INTO `'.getEnvironmentValue('DB_DATABASE')."`.`users` (`name`, `role`, `credits`, `server_limit`, `pterodactyl_id`, `email`, `password`, `created_at`, `referral_code`) VALUES ('$name', 'admin', '250', '1', '$pteroID', '$mail', '$pass', CURRENT_TIMESTAMP, '$random')"; if ($db->query($query1)) { - wh_log("[USER MAKER] Created user with Email ".$mail. " and pterodactyl ID ". $pteroID); - header("LOCATION: index.php?step=7"); + wh_log('[USER MAKER] Created user with Email '.$mail.' and pterodactyl ID '.$pteroID); + header('LOCATION: index.php?step=7'); } else { wh_log($db->error); - header("LOCATION: index.php?step=6&message=Something went wrong when communicating with the Database"); - + header('LOCATION: index.php?step=6&message=Something went wrong when communicating with the Database'); } - - } - - -?> diff --git a/public/install/functions.php b/public/install/functions.php index 10baf2e7d..ed983c57c 100644 --- a/public/install/functions.php +++ b/public/install/functions.php @@ -1,29 +1,29 @@ "7.4", - "maxPhp" => "8.1", // This version is not supported - "mysql" => "5.7.22", + 'minPhp' => '8.1', + 'maxPhp' => '8.2', // This version is not supported + 'mysql' => '5.7.22', ]; function checkPhpVersion() { global $requirements; - if (version_compare(phpversion(), $requirements["minPhp"], '>=') && version_compare(phpversion(), $requirements["maxPhp"], '<')) { - return "OK"; + if (version_compare(phpversion(), $requirements['minPhp'], '>=') && version_compare(phpversion(), $requirements['maxPhp'], '<=')) { + return 'OK'; } - return "not OK"; + + return 'not OK'; } function checkWriteable() { - return is_writable("../../.env"); + return is_writable('../../.env'); } function checkHTTPS() { - return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') + return (! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; } @@ -34,42 +34,39 @@ function getMySQLVersion() $output = shell_exec('mysql -V'); preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version); - $versionoutput = $version[0] ?? "0"; + $versionoutput = $version[0] ?? '0'; - return (intval($versionoutput) > intval($requirements["mysql"]) ? "OK" : $versionoutput); + return intval($versionoutput) > intval($requirements['mysql']) ? 'OK' : $versionoutput; } function getZipVersion() { - $output = shell_exec('zip -v'); preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version); $versionoutput = $version[0] ?? 0; - return ($versionoutput != 0 ? "OK" : "not OK"); + return $versionoutput != 0 ? 'OK' : 'not OK'; } function getGitVersion() { - $output = shell_exec('git --version'); preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version); $versionoutput = $version[0] ?? 0; - return ($versionoutput != 0 ? "OK" : "not OK"); + return $versionoutput != 0 ? 'OK' : 'not OK'; } function getTarVersion() { - $output = shell_exec('tar --version'); preg_match('@[0-9]+\.[0-9]+@', $output, $version); $versionoutput = $version[0] ?? 0; - return ($versionoutput != 0 ? "OK" : "not OK"); + return $versionoutput != 0 ? 'OK' : 'not OK'; } function checkExtensions() @@ -80,16 +77,17 @@ function checkExtensions() $extentions = get_loaded_extensions(); foreach ($required_extentions as $ext) { - if (!preg_grep("/^(?=.*" . $ext . ").*$/", $extentions)) + if (! preg_grep('/^(?=.*'.$ext.').*$/', $extentions)) { array_push($not_ok, $ext); + } } + return $not_ok; } function setEnvironmentValue($envKey, $envValue) { - - $envFile = dirname(__FILE__, 3) . "/.env"; + $envFile = dirname(__FILE__, 3).'/.env'; $str = file_get_contents($envFile); $str .= "\n"; // In case the searched variable is in the last line without \n @@ -106,47 +104,46 @@ function setEnvironmentValue($envKey, $envValue) function getEnvironmentValue($envKey) { - $envFile = dirname(__FILE__, 3) . "/.env"; + $envFile = dirname(__FILE__, 3).'/.env'; $str = file_get_contents($envFile); $str .= "\n"; // In case the searched variable is in the last line without \n $keyPosition = strpos($str, "{$envKey}="); $endOfLinePosition = strpos($str, PHP_EOL, $keyPosition); $oldLine = substr($str, $keyPosition, $endOfLinePosition - $keyPosition); - $value = substr($oldLine, strpos($oldLine, "=") + 1); - - + $value = substr($oldLine, strpos($oldLine, '=') + 1); return $value; } - function run_console($command) { $path = dirname(__FILE__, 3); $cmd = "cd '$path' && bash -c 'exec -a ServerCPP $command' 2>&1"; + return shell_exec($cmd); } function wh_log($log_msg) { - $log_filename = "logs"; - if (!file_exists($log_filename)) { + $log_filename = 'logs'; + if (! file_exists($log_filename)) { // create directory/folder uploads. mkdir($log_filename, 0777, true); } - $log_file_data = $log_filename . '/installer.log'; + $log_file_data = $log_filename.'/installer.log'; // if you don't add `FILE_APPEND`, the file will be erased each time you add a log - file_put_contents($log_file_data, "[" . date('h:i:s') . "] " . $log_msg . "\n", FILE_APPEND); + file_put_contents($log_file_data, '['.date('h:i:s').'] '.$log_msg."\n", FILE_APPEND); } - -function generateRandomString($length = 8) { +function generateRandomString($length = 8) +{ $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i = 0; $i < $length; $i++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } + return $randomString; } diff --git a/public/install/index.php b/public/install/index.php index bc37320a4..b002282bc 100644 --- a/public/install/index.php +++ b/public/install/index.php @@ -1,8 +1,8 @@ @@ -52,43 +52,39 @@
'; - -if (!isset($_GET['step'])) { - - - if (!file_exists("../../.env")) { +if (! isset($_GET['step'])) { + if (! file_exists('../../.env')) { echo run_console('cp .env.example .env'); - } - echo $cardheader; - ?> + echo $cardheader; ?> -

">HTTPS is required

+

HTTPS is required

-

">Write-permissions on .env-file

+

Write-permissions on .env-file

-

"> php - version: (minimum required )

-

"> mysql - version: (minimum required )

+

php + version: (minimum required )

-

"> Missing - php-extentions: "> mysql + version: (minimum required )

+ +

Missing + php-extentions:

+ echo count(checkExtensions()) == 0 ? '' : '(Proceed anyway)'; ?>

- -

"> Git +

Git version:

-

"> Tar +

Tar version:

@@ -101,13 +97,11 @@ + echo $cardheader; ?> " . $_GET['message'] . "

"; -} -?> + echo "

".$_GET['message'].'

'; + } ?>
@@ -174,17 +168,14 @@ class="form-control ">
+ echo $cardheader; ?>

This process might take a while. Please do not refresh or close this page!

" . $_GET['message'] . "

"; - } - - ?> + echo "

".$_GET['message'].'

'; + } ?> @@ -198,18 +189,15 @@ class="form-control "> + echo $cardheader; ?> " . $_GET['message'] . "

"; - } - ?> + echo "

".$_GET['message'].'

'; + } ?> @@ -222,7 +210,7 @@ class="form-control "> " class="form-control"> + value="" class="form-control">
@@ -245,17 +233,15 @@ class="form-control ">
+ echo $cardheader; ?> " . $_GET['message'] . "

"; - } - ?> + echo "

".$_GET['message'].'

'; + } ?> + echo $cardheader; ?> " . $_GET['message'] . "

"; - } - ?> + echo "

".$_GET['message'].'

'; + } ?> + echo $cardheader; ?> " . $_GET['message'] . "

"; - } - ?> + echo "

".$_GET['message'].'

'; + } ?> @@ -446,18 +427,16 @@ class="form-control "> + echo $cardheader; ?> - "> + diff --git a/public/install/phpmailer/Exception.php b/public/install/phpmailer/Exception.php index 52eaf9515..34b5bd4ba 100644 --- a/public/install/phpmailer/Exception.php +++ b/public/install/phpmailer/Exception.php @@ -35,6 +35,6 @@ class Exception extends \Exception */ public function errorMessage() { - return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . "
\n"; + return ''.htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401)."
\n"; } } diff --git a/public/install/phpmailer/PHPMailer.php b/public/install/phpmailer/PHPMailer.php index e1b0c88f2..82dbc52a4 100644 --- a/public/install/phpmailer/PHPMailer.php +++ b/public/install/phpmailer/PHPMailer.php @@ -32,32 +32,51 @@ class PHPMailer { const CHARSET_ASCII = 'us-ascii'; + const CHARSET_ISO88591 = 'iso-8859-1'; + const CHARSET_UTF8 = 'utf-8'; const CONTENT_TYPE_PLAINTEXT = 'text/plain'; + const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; + const CONTENT_TYPE_TEXT_HTML = 'text/html'; + const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; + const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; + const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; const ENCODING_7BIT = '7bit'; + const ENCODING_8BIT = '8bit'; + const ENCODING_BASE64 = 'base64'; + const ENCODING_BINARY = 'binary'; + const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; const ENCRYPTION_STARTTLS = 'tls'; + const ENCRYPTION_SMTPS = 'ssl'; const ICAL_METHOD_REQUEST = 'REQUEST'; + const ICAL_METHOD_PUBLISH = 'PUBLISH'; + const ICAL_METHOD_REPLY = 'REPLY'; + const ICAL_METHOD_ADD = 'ADD'; + const ICAL_METHOD_CANCEL = 'CANCEL'; + const ICAL_METHOD_REFRESH = 'REFRESH'; + const ICAL_METHOD_COUNTER = 'COUNTER'; + const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER'; /** @@ -389,12 +408,12 @@ class PHPMailer * SMTP class debug output mode. * Debug output level. * Options: + * * @see SMTP::DEBUG_OFF: No output * @see SMTP::DEBUG_CLIENT: Client messages * @see SMTP::DEBUG_SERVER: Client and server messages * @see SMTP::DEBUG_CONNECTION: As SERVER plus connection status * @see SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed - * * @see SMTP::$do_debug * * @var int @@ -821,7 +840,7 @@ class PHPMailer /** * Constructor. * - * @param bool $exceptions Should we throw external exceptions? + * @param bool $exceptions Should we throw external exceptions? */ public function __construct($exceptions = null) { @@ -847,12 +866,11 @@ public function __destruct() * claims to be sendmail), don't pass params (not a perfect fix, * but it will do). * - * @param string $to To - * @param string $subject Subject - * @param string $body Message Body - * @param string $header Additional Header(s) - * @param string|null $params Params - * + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string|null $params Params * @return bool */ private function mailPassthru($to, $subject, $body, $header, $params) @@ -865,18 +883,19 @@ private function mailPassthru($to, $subject, $body, $header, $params) } //Calling mail() with null params breaks $this->edebug('Sending with mail()'); - $this->edebug('Sendmail path: ' . ini_get('sendmail_path')); + $this->edebug('Sendmail path: '.ini_get('sendmail_path')); $this->edebug("Envelope sender: {$this->Sender}"); $this->edebug("To: {$to}"); $this->edebug("Subject: {$subject}"); $this->edebug("Headers: {$header}"); - if (!$this->UseSendmailOptions || null === $params) { + if (! $this->UseSendmailOptions || null === $params) { $result = @mail($to, $subject, $body, $header); } else { $this->edebug("Additional params: {$params}"); $result = @mail($to, $subject, $body, $header, $params); } - $this->edebug('Result: ' . ($result ? 'true' : 'false')); + $this->edebug('Result: '.($result ? 'true' : 'false')); + return $result; } @@ -887,7 +906,7 @@ private function mailPassthru($to, $subject, $body, $header, $params) * @see PHPMailer::$Debugoutput * @see PHPMailer::$SMTPDebug * - * @param string $str + * @param string $str */ protected function edebug($str) { @@ -901,7 +920,7 @@ protected function edebug($str) return; } //Avoid clash with built-in function names - if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) { + if (is_callable($this->Debugoutput) && ! in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) { call_user_func($this->Debugoutput, $str, $this->SMTPDebug); return; @@ -942,7 +961,7 @@ protected function edebug($str) /** * Sets message type to HTML or plain. * - * @param bool $isHtml True for HTML mode + * @param bool $isHtml True for HTML mode */ public function isHTML($isHtml = true) { @@ -1002,12 +1021,11 @@ public function isQmail() /** * Add a "To" address. * - * @param string $address The email address to send to - * @param string $name + * @param string $address The email address to send to + * @param string $name + * @return bool true on success, false if address already used or invalid in some way * * @throws Exception - * - * @return bool true on success, false if address already used or invalid in some way */ public function addAddress($address, $name = '') { @@ -1017,12 +1035,11 @@ public function addAddress($address, $name = '') /** * Add a "CC" address. * - * @param string $address The email address to send to - * @param string $name + * @param string $address The email address to send to + * @param string $name + * @return bool true on success, false if address already used or invalid in some way * * @throws Exception - * - * @return bool true on success, false if address already used or invalid in some way */ public function addCC($address, $name = '') { @@ -1032,12 +1049,11 @@ public function addCC($address, $name = '') /** * Add a "BCC" address. * - * @param string $address The email address to send to - * @param string $name + * @param string $address The email address to send to + * @param string $name + * @return bool true on success, false if address already used or invalid in some way * * @throws Exception - * - * @return bool true on success, false if address already used or invalid in some way */ public function addBCC($address, $name = '') { @@ -1047,12 +1063,11 @@ public function addBCC($address, $name = '') /** * Add a "Reply-To" address. * - * @param string $address The email address to reply to - * @param string $name + * @param string $address The email address to reply to + * @param string $name + * @return bool true on success, false if address already used or invalid in some way * * @throws Exception - * - * @return bool true on success, false if address already used or invalid in some way */ public function addReplyTo($address, $name = '') { @@ -1065,13 +1080,12 @@ public function addReplyTo($address, $name = '') * be modified after calling this function), addition of such addresses is delayed until send(). * Addresses that have been added already return false, but do not throw exceptions. * - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' - * @param string $address The email address to send, resp. to reply to - * @param string $name + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * @return bool true on success, false if address already used or invalid in some way * * @throws Exception - * - * @return bool true on success, false if address already used or invalid in some way */ protected function addOrEnqueueAnAddress($kind, $address, $name) { @@ -1098,12 +1112,12 @@ protected function addOrEnqueueAnAddress($kind, $address, $name) //Enqueue addresses with IDN until we know the PHPMailer::$CharSet. if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) { if ('Reply-To' !== $kind) { - if (!array_key_exists($address, $this->RecipientsQueue)) { + if (! array_key_exists($address, $this->RecipientsQueue)) { $this->RecipientsQueue[$address] = $params; return true; } - } elseif (!array_key_exists($address, $this->ReplyToQueue)) { + } elseif (! array_key_exists($address, $this->ReplyToQueue)) { $this->ReplyToQueue[$address] = $params; return true; @@ -1120,17 +1134,16 @@ protected function addOrEnqueueAnAddress($kind, $address, $name) * Add an address to one of the recipient arrays or to the ReplyTo array. * Addresses that have been added already return false, but do not throw exceptions. * - * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' - * @param string $address The email address to send, resp. to reply to - * @param string $name + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * @return bool true on success, false if address already used or invalid in some way * * @throws Exception - * - * @return bool true on success, false if address already used or invalid in some way */ protected function addAnAddress($kind, $address, $name = '') { - if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { + if (! in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { $error_message = sprintf( '%s: %s', $this->lang('Invalid recipient kind'), @@ -1144,7 +1157,7 @@ protected function addAnAddress($kind, $address, $name = '') return false; } - if (!static::validateAddress($address)) { + if (! static::validateAddress($address)) { $error_message = sprintf( '%s (%s): %s', $this->lang('invalid_address'), @@ -1160,13 +1173,13 @@ protected function addAnAddress($kind, $address, $name = '') return false; } if ('Reply-To' !== $kind) { - if (!array_key_exists(strtolower($address), $this->all_recipients)) { + if (! array_key_exists(strtolower($address), $this->all_recipients)) { $this->{$kind}[] = [$address, $name]; $this->all_recipients[strtolower($address)] = true; return true; } - } elseif (!array_key_exists(strtolower($address), $this->ReplyTo)) { + } elseif (! array_key_exists(strtolower($address), $this->ReplyTo)) { $this->ReplyTo[strtolower($address)] = [$address, $name]; return true; @@ -1183,10 +1196,9 @@ protected function addAnAddress($kind, $address, $name = '') * * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation * - * @param string $addrstr The address list string - * @param bool $useimap Whether to use the IMAP extension to parse the list - * @param string $charset The charset to use when decoding the address list string. - * + * @param string $addrstr The address list string + * @param bool $useimap Whether to use the IMAP extension to parse the list + * @param string $charset The charset to use when decoding the address list string. * @return array */ public static function parseAddresses($addrstr, $useimap = true, $charset = self::CHARSET_ISO88591) @@ -1200,7 +1212,7 @@ public static function parseAddresses($addrstr, $useimap = true, $charset = self foreach ($list as $address) { if ( '.SYNTAX-ERROR.' !== $address->host && - static::validateAddress($address->mailbox . '@' . $address->host) + static::validateAddress($address->mailbox.'@'.$address->host) ) { //Decode the name part if it's present and encoded if ( @@ -1220,7 +1232,7 @@ public static function parseAddresses($addrstr, $useimap = true, $charset = self $addresses[] = [ 'name' => (property_exists($address, 'personal') ? $address->personal : ''), - 'address' => $address->mailbox . '@' . $address->host, + 'address' => $address->mailbox.'@'.$address->host, ]; } } @@ -1239,7 +1251,7 @@ public static function parseAddresses($addrstr, $useimap = true, $charset = self ]; } } else { - list($name, $email) = explode('<', $address); + [$name, $email] = explode('<', $address); $email = trim(str_replace('>', '', $email)); $name = trim($name); if (static::validateAddress($email)) { @@ -1270,13 +1282,12 @@ public static function parseAddresses($addrstr, $useimap = true, $charset = self /** * Set the From and FromName properties. * - * @param string $address - * @param string $name - * @param bool $auto Whether to also set the Sender address, defaults to true + * @param string $address + * @param string $name + * @param bool $auto Whether to also set the Sender address, defaults to true + * @return bool * * @throws Exception - * - * @return bool */ public function setFrom($address, $name = '', $auto = true) { @@ -1286,8 +1297,8 @@ public function setFrom($address, $name = '', $auto = true) $pos = strrpos($address, '@'); if ( (false === $pos) - || ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported()) - && !static::validateAddress($address)) + || ((! $this->has8bitChars(substr($address, ++$pos)) || ! static::idnSupported()) + && ! static::validateAddress($address)) ) { $error_message = sprintf( '%s (From): %s', @@ -1343,9 +1354,8 @@ public function getLastMessageID() * * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. * - * @param string $address The email address to check - * @param string|callable $patternselect Which pattern to use - * + * @param string $address The email address to check + * @param string|callable $patternselect Which pattern to use * @return bool */ public static function validateAddress($address, $patternselect = null) @@ -1354,7 +1364,7 @@ public static function validateAddress($address, $patternselect = null) $patternselect = static::$validator; } //Don't allow strings as callables, see SECURITY.md and CVE-2021-3603 - if (is_callable($patternselect) && !is_string($patternselect)) { + if (is_callable($patternselect) && ! is_string($patternselect)) { return call_user_func($patternselect, $address); } //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 @@ -1381,14 +1391,14 @@ public static function validateAddress($address, $patternselect = null) * Feel free to use and redistribute this code. But please keep this copyright notice. */ return (bool) preg_match( - '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . - '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . - '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . - '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . - '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . - '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . - '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . - '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)'. + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)'. + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)'. + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*'. + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)'. + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}'. + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:'. + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}'. '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address ); @@ -1399,7 +1409,7 @@ public static function validateAddress($address, $patternselect = null) * @see https://html.spec.whatwg.org/#e-mail-state-(type=email) */ return (bool) preg_match( - '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . + '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}'. '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', $address ); @@ -1430,8 +1440,7 @@ public static function idnSupported() * * @see PHPMailer::$CharSet * - * @param string $address The email address to convert - * + * @param string $address The email address to convert * @return string The encoded address in ASCII form */ public function punyencodeAddress($address) @@ -1439,7 +1448,7 @@ public function punyencodeAddress($address) //Verify we have required functions, CharSet, and at-sign. $pos = strrpos($address, '@'); if ( - !empty($this->CharSet) && + ! empty($this->CharSet) && false !== $pos && static::idnSupported() ) { @@ -1466,7 +1475,7 @@ public function punyencodeAddress($address) $punycode = idn_to_ascii($domain, $errorcode); } if (false !== $punycode) { - return substr($address, 0, $pos) . $punycode; + return substr($address, 0, $pos).$punycode; } } } @@ -1478,14 +1487,14 @@ public function punyencodeAddress($address) * Create a message and send it. * Uses the sending method specified by $Mailer. * - * @throws Exception - * * @return bool false on error - See the ErrorInfo property for details of the error + * + * @throws Exception */ public function send() { try { - if (!$this->preSend()) { + if (! $this->preSend()) { return false; } @@ -1504,9 +1513,9 @@ public function send() /** * Prepare a message for sending. * - * @throws Exception - * * @return bool + * + * @throws Exception */ public function preSend() { @@ -1552,7 +1561,7 @@ public function preSend() continue; } $this->$address_kind = $this->punyencodeAddress($this->$address_kind); - if (!static::validateAddress($this->$address_kind)) { + if (! static::validateAddress($this->$address_kind)) { $error_message = sprintf( '%s (%s): %s', $this->lang('invalid_address'), @@ -1576,7 +1585,7 @@ public function preSend() $this->setMessageType(); //Refuse to send an empty message unless we are specifically allowing it - if (!$this->AllowEmpty && empty($this->Body)) { + if (! $this->AllowEmpty && empty($this->Body)) { throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); } @@ -1606,22 +1615,22 @@ public function preSend() //Sign with DKIM if enabled if ( - !empty($this->DKIM_domain) - && !empty($this->DKIM_selector) - && (!empty($this->DKIM_private_string) - || (!empty($this->DKIM_private) + ! empty($this->DKIM_domain) + && ! empty($this->DKIM_selector) + && (! empty($this->DKIM_private_string) + || (! empty($this->DKIM_private) && static::isPermittedPath($this->DKIM_private) && file_exists($this->DKIM_private) ) ) ) { $header_dkim = $this->DKIM_Add( - $this->MIMEHeader . $this->mailHeader, + $this->MIMEHeader.$this->mailHeader, $this->encodeHeader($this->secureHeader($this->Subject)), $this->MIMEBody ); - $this->MIMEHeader = static::stripTrailingWSP($this->MIMEHeader) . static::$LE . - static::normalizeBreaks($header_dkim) . static::$LE; + $this->MIMEHeader = static::stripTrailingWSP($this->MIMEHeader).static::$LE. + static::normalizeBreaks($header_dkim).static::$LE; } return true; @@ -1638,9 +1647,9 @@ public function preSend() /** * Actually send a message via the selected mechanism. * - * @throws Exception - * * @return bool + * + * @throws Exception */ public function postSend() { @@ -1655,7 +1664,7 @@ public function postSend() case 'mail': return $this->mailSend($this->MIMEHeader, $this->MIMEBody); default: - $sendMethod = $this->Mailer . 'Send'; + $sendMethod = $this->Mailer.'Send'; if (method_exists($this, $sendMethod)) { return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); } @@ -1681,12 +1690,11 @@ public function postSend() * * @see PHPMailer::$Sendmail * - * @param string $header The message headers - * @param string $body The message body + * @param string $header The message headers + * @param string $body The message body + * @return bool * * @throws Exception - * - * @return bool */ protected function sendmailSend($header, $body) { @@ -1695,7 +1703,7 @@ protected function sendmailSend($header, $body) } else { $this->edebug('Sending with sendmail'); } - $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + $header = static::stripTrailingWSP($header).static::$LE.static::$LE; //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver //A space after `-f` is optional, but there is a long history of its presence //causing problems, so we don't use one @@ -1706,12 +1714,12 @@ protected function sendmailSend($header, $body) //PHP 5.6 workaround $sendmail_from_value = ini_get('sendmail_from'); - if (empty($this->Sender) && !empty($sendmail_from_value)) { + if (empty($this->Sender) && ! empty($sendmail_from_value)) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } //CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. - if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { + if (! empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) { if ($this->Mailer === 'qmail') { $sendmailFmt = '%s -f%s'; } else { @@ -1727,19 +1735,19 @@ protected function sendmailSend($header, $body) } $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); - $this->edebug('Sendmail path: ' . $this->Sendmail); - $this->edebug('Sendmail command: ' . $sendmail); - $this->edebug('Envelope sender: ' . $this->Sender); + $this->edebug('Sendmail path: '.$this->Sendmail); + $this->edebug('Sendmail command: '.$sendmail); + $this->edebug('Envelope sender: '.$this->Sender); $this->edebug("Headers: {$header}"); if ($this->SingleTo) { foreach ($this->SingleToArray as $toAddr) { $mail = @popen($sendmail, 'w'); - if (!$mail) { - throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + if (! $mail) { + throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL); } $this->edebug("To: {$toAddr}"); - fwrite($mail, 'To: ' . $toAddr . "\n"); + fwrite($mail, 'To: '.$toAddr."\n"); fwrite($mail, $header); fwrite($mail, $body); $result = pclose($mail); @@ -1754,15 +1762,15 @@ protected function sendmailSend($header, $body) $this->From, [] ); - $this->edebug("Result: " . ($result === 0 ? 'true' : 'false')); + $this->edebug('Result: '.($result === 0 ? 'true' : 'false')); if (0 !== $result) { - throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL); } } } else { $mail = @popen($sendmail, 'w'); - if (!$mail) { - throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + if (! $mail) { + throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL); } fwrite($mail, $header); fwrite($mail, $body); @@ -1777,9 +1785,9 @@ protected function sendmailSend($header, $body) $this->From, [] ); - $this->edebug("Result: " . ($result === 0 ? 'true' : 'false')); + $this->edebug('Result: '.($result === 0 ? 'true' : 'false')); if (0 !== $result) { - throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + throw new Exception($this->lang('execute').$this->Sendmail, self::STOP_CRITICAL); } } @@ -1792,8 +1800,7 @@ protected function sendmailSend($header, $body) * * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report * - * @param string $string The string to be validated - * + * @param string $string The string to be validated * @return bool */ protected static function isShellSafe($string) @@ -1801,20 +1808,20 @@ protected static function isShellSafe($string) //Future-proof if ( escapeshellcmd($string) !== $string - || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) + || ! in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) ) { return false; } $length = strlen($string); - for ($i = 0; $i < $length; ++$i) { + for ($i = 0; $i < $length; $i++) { $c = $string[$i]; //All other characters have a special meaning in at least one common shell, including = and +. //Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. //Note that this does permit non-Latin alphanumeric characters based on the current locale. - if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + if (! ctype_alnum($c) && strpos('@_-.', $c) === false) { return false; } } @@ -1827,26 +1834,24 @@ protected static function isShellSafe($string) * Used to reject URLs and phar files from functions that access local file paths, * such as addAttachment. * - * @param string $path A relative or absolute path to a file - * + * @param string $path A relative or absolute path to a file * @return bool */ protected static function isPermittedPath($path) { //Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1 - return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path); + return ! preg_match('#^[a-z][a-z\d+.-]*://#i', $path); } /** * Check whether a file path is safe, accessible, and readable. * - * @param string $path A relative or absolute path to a file - * + * @param string $path A relative or absolute path to a file * @return bool */ protected static function fileIsAccessible($path) { - if (!static::isPermittedPath($path)) { + if (! static::isPermittedPath($path)) { return false; } $readable = file_exists($path); @@ -1854,6 +1859,7 @@ protected static function fileIsAccessible($path) if (strpos($path, '\\\\') !== 0) { $readable = $readable && is_readable($path); } + return $readable; } @@ -1862,16 +1868,15 @@ protected static function fileIsAccessible($path) * * @see http://www.php.net/manual/en/book.mail.php * - * @param string $header The message headers - * @param string $body The message body + * @param string $header The message headers + * @param string $body The message body + * @return bool * * @throws Exception - * - * @return bool */ protected function mailSend($header, $body) { - $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + $header = static::stripTrailingWSP($header).static::$LE.static::$LE; $toArr = []; foreach ($this->to as $toaddr) { @@ -1891,11 +1896,11 @@ protected function mailSend($header, $body) //PHP 5.6 workaround $sendmail_from_value = ini_get('sendmail_from'); - if (empty($this->Sender) && !empty($sendmail_from_value)) { + if (empty($this->Sender) && ! empty($sendmail_from_value)) { //PHP config has a sender address we can use $this->Sender = ini_get('sendmail_from'); } - if (!empty($this->Sender) && static::validateAddress($this->Sender)) { + if (! empty($this->Sender) && static::validateAddress($this->Sender)) { if (self::isShellSafe($this->Sender)) { $params = sprintf('-f%s', $this->Sender); } @@ -1925,7 +1930,7 @@ protected function mailSend($header, $body) if (isset($old_from)) { ini_set('sendmail_from', $old_from); } - if (!$result) { + if (! $result) { throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL); } @@ -1941,7 +1946,7 @@ protected function mailSend($header, $body) */ public function getSMTPInstance() { - if (!is_object($this->smtp)) { + if (! is_object($this->smtp)) { $this->smtp = new SMTP(); } @@ -1968,18 +1973,17 @@ public function setSMTPInstance(SMTP $smtp) * * @uses \PHPMailer\PHPMailer\SMTP * - * @param string $header The message headers - * @param string $body The message body + * @param string $header The message headers + * @param string $body The message body + * @return bool * * @throws Exception - * - * @return bool */ protected function smtpSend($header, $body) { - $header = static::stripTrailingWSP($header) . static::$LE . static::$LE; + $header = static::stripTrailingWSP($header).static::$LE.static::$LE; $bad_rcpt = []; - if (!$this->smtpConnect($this->SMTPOptions)) { + if (! $this->smtpConnect($this->SMTPOptions)) { throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); } //Sender already validated in preSend() @@ -1988,8 +1992,8 @@ protected function smtpSend($header, $body) } else { $smtp_from = $this->Sender; } - if (!$this->smtp->mail($smtp_from)) { - $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + if (! $this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed').$smtp_from.' : '.implode(',', $this->smtp->getError())); throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); } @@ -1997,7 +2001,7 @@ protected function smtpSend($header, $body) //Attempt to send to all recipients foreach ([$this->to, $this->cc, $this->bcc] as $togroup) { foreach ($togroup as $to) { - if (!$this->smtp->recipient($to[0], $this->dsn)) { + if (! $this->smtp->recipient($to[0], $this->dsn)) { $error = $this->smtp->getError(); $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']]; $isSent = false; @@ -2010,7 +2014,7 @@ protected function smtpSend($header, $body) } //Only send the DATA command if we have viable recipients - if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) { + if ((count($this->all_recipients) > count($bad_rcpt)) && ! $this->smtp->data($header.$body)) { throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL); } @@ -2040,9 +2044,9 @@ protected function smtpSend($header, $body) if (count($bad_rcpt) > 0) { $errstr = ''; foreach ($bad_rcpt as $bad) { - $errstr .= $bad['to'] . ': ' . $bad['error']; + $errstr .= $bad['to'].': '.$bad['error']; } - throw new Exception($this->lang('recipients_failed') . $errstr, self::STOP_CONTINUE); + throw new Exception($this->lang('recipients_failed').$errstr, self::STOP_CONTINUE); } return true; @@ -2052,13 +2056,12 @@ protected function smtpSend($header, $body) * Initiate a connection to an SMTP server. * Returns false if the operation failed. * - * @param array $options An array of options compatible with stream_context_create() + * @param array $options An array of options compatible with stream_context_create() + * @return bool * * @throws Exception * * @uses \PHPMailer\PHPMailer\SMTP - * - * @return bool */ public function smtpConnect($options = null) { @@ -2086,13 +2089,13 @@ public function smtpConnect($options = null) foreach ($hosts as $hostentry) { $hostinfo = []; if ( - !preg_match( + ! preg_match( '/^(?:(ssl|tls):\/\/)?(.+?)(?::(\d+))?$/', trim($hostentry), $hostinfo ) ) { - $this->edebug($this->lang('invalid_hostentry') . ' ' . trim($hostentry)); + $this->edebug($this->lang('invalid_hostentry').' '.trim($hostentry)); //Not a valid host entry continue; } @@ -2103,8 +2106,8 @@ public function smtpConnect($options = null) //If it's not specified, the default value is used //Check the host name is a valid name or IP address before trying to use it - if (!static::isValidHost($hostinfo[2])) { - $this->edebug($this->lang('invalid_host') . ' ' . $hostinfo[2]); + if (! static::isValidHost($hostinfo[2])) { + $this->edebug($this->lang('invalid_host').' '.$hostinfo[2]); continue; } $prefix = ''; @@ -2123,8 +2126,8 @@ public function smtpConnect($options = null) $sslext = defined('OPENSSL_ALGO_SHA256'); if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) { //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled - if (!$sslext) { - throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL); + if (! $sslext) { + throw new Exception($this->lang('extension_missing').'openssl', self::STOP_CRITICAL); } } $host = $hostinfo[2]; @@ -2137,7 +2140,7 @@ public function smtpConnect($options = null) ) { $port = (int) $hostinfo[3]; } - if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + if ($this->smtp->connect($prefix.$host, $port, $this->Timeout, $options)) { try { if ($this->Helo) { $hello = $this->Helo; @@ -2154,14 +2157,14 @@ public function smtpConnect($options = null) $tls = true; } if ($tls) { - if (!$this->smtp->startTLS()) { + if (! $this->smtp->startTLS()) { throw new Exception($this->lang('connect_host')); } //We must resend EHLO after TLS negotiation $this->smtp->hello($hello); } if ( - $this->SMTPAuth && !$this->smtp->authenticate( + $this->SMTPAuth && ! $this->smtp->authenticate( $this->Username, $this->Password, $this->AuthType, @@ -2205,12 +2208,11 @@ public function smtpClose() * Set the language for error messages. * The default language is English. * - * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") * Optionally, the language code can be enhanced with a 4-character * script annotation and/or a 2-character country annotation. - * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * @param string $lang_path Path to the language file directory, with trailing separator (slash) * Do not set this from user input! - * * @return bool Returns true if the requested language was loaded, false otherwise. */ public function setLanguage($langcode = 'en', $lang_path = '') @@ -2234,8 +2236,8 @@ public function setLanguage($langcode = 'en', $lang_path = '') //Define full set of translatable strings in English $PHPMAILER_LANG = [ 'authenticate' => 'SMTP Error: Could not authenticate.', - 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.' . - ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + 'buggy_php' => 'Your version of PHP is affected by a bug that may result in corrupted messages.'. + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in'. ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', 'data_not_accepted' => 'SMTP Error: data not accepted.', @@ -2264,14 +2266,14 @@ public function setLanguage($langcode = 'en', $lang_path = '') ]; if (empty($lang_path)) { //Calculate an absolute path so it can work if CWD is not here - $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; + $lang_path = dirname(__DIR__).DIRECTORY_SEPARATOR.'language'.DIRECTORY_SEPARATOR; } //Validate $langcode $foundlang = true; - $langcode = strtolower($langcode); + $langcode = strtolower($langcode); if ( - !preg_match('/^(?P[a-z]{2})(?P - - -@endsection diff --git a/routes/api.php b/routes/api.php index 0de04de60..74333b749 100644 --- a/routes/api.php +++ b/routes/api.php @@ -34,6 +34,8 @@ Route::get('/notifications/{user}', [NotificationController::class, 'index']); Route::get('/notifications/{user}/{notification}', [NotificationController::class, 'view']); Route::post('/notifications', [NotificationController::class, 'send']); - Route::delete('/notifications/{user}', [NotificationController::class, 'delete']); Route::delete('/notifications/{user}/{notification}', [NotificationController::class, 'deleteOne']); + Route::delete('/notifications/{user}', [NotificationController::class, 'delete']); }); + +require __DIR__ . '/extensions_api.php'; diff --git a/routes/extensions_api.php b/routes/extensions_api.php new file mode 100644 index 000000000..31fb89d31 --- /dev/null +++ b/routes/extensions_api.php @@ -0,0 +1,21 @@ + 'extensions', 'middleware' => 'api.token'], function () { + // get all extensions that are inside App/Extensions + // It is important that the extensions are inside a folder with the name of the extension + // while those folders are inside Folders with the name of the type of extension like PaymentGateways, Themes, etc. + $extensionNamespaces = glob(app_path() . '/Extensions/*', GLOB_ONLYDIR); + $extensions = []; + foreach ($extensionNamespaces as $extensionNamespace) { + $extensions = array_merge($extensions, glob($extensionNamespace . '/*', GLOB_ONLYDIR)); + } + + foreach ($extensions as $extension) { + $routesFile = $extension . '/api_routes.php'; + if (file_exists($routesFile)) { + include_once $routesFile; + } + } +}); diff --git a/routes/extensions_web.php b/routes/extensions_web.php new file mode 100644 index 000000000..920dc2993 --- /dev/null +++ b/routes/extensions_web.php @@ -0,0 +1,22 @@ + 'extensions'], function () { + + // get all extensions that are inside App/Extensions + // It is important that the extensions are inside a folder with the name of the extension + // while those folders are inside Folders with the name of the type of extension like PaymentGateways, Themes, etc. + $extensionNamespaces = glob(app_path() . '/Extensions/*', GLOB_ONLYDIR); + $extensions = []; + foreach ($extensionNamespaces as $extensionNamespace) { + $extensions = array_merge($extensions, glob($extensionNamespace . '/*', GLOB_ONLYDIR)); + } + + foreach ($extensions as $extension) { + $routesFile = $extension . '/web_routes.php'; + if (file_exists($routesFile)) { + include_once $routesFile; + } + } +}); diff --git a/routes/web.php b/routes/web.php index c3b360476..9c873ad15 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,35 +1,36 @@ get('/', function () { return redirect('login'); })->name('welcome'); Auth::routes(['verify' => true]); -# Stripe WebhookRoute -> validation in Route Handler -Route::post('payment/StripeWebhooks', [PaymentController::class, 'StripeWebhooks'])->name('payment.StripeWebhooks'); +Route::get('/privacy', function () { + return view('information.privacy'); +})->name('privacy'); +Route::get('/imprint', function () { + return view('information.imprint'); +})->name('imprint'); +Route::get('/tos', function () { + return view('information.tos'); +})->name('tos'); Route::middleware(['auth', 'checkSuspended'])->group(function () { - #resend verification email + //resend verification email Route::get('/email/verification-notification', function (Request $request) { $request->user()->sendEmailVerificationNotification(); return back()->with('success', 'Verification link sent!'); })->middleware(['auth', 'throttle:3,1'])->name('verification.send'); - #normal routes - Route::get('notifications/readAll',[NotificationController::class,'readAll'])->name('notifications.readAll'); + //normal routes + Route::get('notifications/readAll', [NotificationController::class, 'readAll'])->name('notifications.readAll'); Route::resource('notifications', NotificationController::class); Route::resource('servers', ServerController::class); - if(config('SETTINGS::SYSTEM:ENABLE_UPGRADE')){ - Route::post('servers/{server}/upgrade', [ServerController::class,'upgrade'])->name('servers.upgrade'); + if (config('SETTINGS::SYSTEM:ENABLE_UPGRADE')) { + Route::post('servers/{server}/upgrade', [ServerController::class, 'upgrade'])->name('servers.upgrade'); } + + Route::post('profile/selfdestruct', [ProfileController::class, 'selfDestroyUser'])->name('profile.selfDestroyUser'); Route::resource('profile', ProfileController::class); Route::resource('store', StoreController::class); - #server create utility routes (product) - #routes made for server create page to fetch product info + //server create utility routes (product) + //routes made for server create page to fetch product info Route::get('/products/nodes/egg/{egg?}', [FrontProductController::class, 'getNodesBasedOnEgg'])->name('products.nodes.egg'); Route::get('/products/locations/egg/{egg?}', [FrontProductController::class, 'getLocationsBasedOnEgg'])->name('products.locations.egg'); Route::get('/products/products/{egg?}/{node?}', [FrontProductController::class, 'getProductsBasedOnNode'])->name('products.products.node'); - #payments + //payments Route::get('checkout/{shopProduct}', [PaymentController::class, 'checkOut'])->name('checkout'); - Route::get('payment/PaypalPay/{shopProduct}', [PaymentController::class, 'PaypalPay'])->name('payment.PaypalPay'); - Route::get('payment/PaypalSuccess', [PaymentController::class, 'PaypalSuccess'])->name('payment.PaypalSuccess'); - Route::get('payment/StripePay/{shopProduct}', [PaymentController::class, 'StripePay'])->name('payment.StripePay'); - Route::get('payment/StripeSuccess', [PaymentController::class, 'StripeSuccess'])->name('payment.StripeSuccess'); + Route::post('payment/pay', [PaymentController::class, 'pay'])->name('payment.pay'); + Route::get('payment/FreePay/{shopProduct}', [PaymentController::class, 'FreePay'])->name('payment.FreePay'); Route::get('payment/Cancel', [PaymentController::class, 'Cancel'])->name('payment.Cancel'); Route::get('users/logbackin', [UserController::class, 'logBackIn'])->name('users.logbackin'); - #discord + //discord Route::get('/auth/redirect', [SocialiteController::class, 'redirect'])->name('auth.redirect'); Route::get('/auth/callback', [SocialiteController::class, 'callback'])->name('auth.callback'); - #voucher redeem + //voucher redeem Route::post('/voucher/redeem', [VoucherController::class, 'redeem'])->middleware('throttle:5,1')->name('voucher.redeem'); - #switch language + //switch language Route::post('changelocale', [TranslationController::class, 'changeLocale'])->name('changeLocale'); - #ticket user - if(config("SETTINGS::TICKET:ENABLED")) { + //ticket user + if (config('SETTINGS::TICKET:ENABLED')) { Route::get('ticket', [TicketsController::class, 'index'])->name('ticket.index'); Route::get('ticket/datatable', [TicketsController::class, 'datatable'])->name('ticket.datatable'); Route::get('ticket/new', [TicketsController::class, 'create'])->name('ticket.new'); Route::post('ticket/new', [TicketsController::class, 'store'])->middleware(['throttle:ticket-new'])->name('ticket.new.store'); Route::get('ticket/show/{ticket_id}', [TicketsController::class, 'show'])->name('ticket.show'); Route::post('ticket/reply', [TicketsController::class, 'reply'])->middleware(['throttle:ticket-reply'])->name('ticket.reply'); + Route::post('ticket/close/{ticket_id}', [TicketsController::class, 'close'])->name('ticket.close'); } - #admin + //admin Route::prefix('admin')->name('admin.')->middleware('admin')->group(function () { - #overview + //overview Route::get('overview', [OverViewController::class, 'index'])->name('overview.index'); Route::get('overview/sync', [OverViewController::class, 'syncPterodactyl'])->name('overview.sync'); Route::resource('activitylogs', ActivityLogController::class); - #users - Route::get("users.json", [UserController::class, "json"])->name('users.json'); + //users + Route::get('users.json', [UserController::class, 'json'])->name('users.json'); Route::get('users/loginas/{user}', [UserController::class, 'loginAs'])->name('users.loginas'); Route::get('users/verifyEmail/{user}', [UserController::class, 'verifyEmail'])->name('users.verifyEmail'); Route::get('users/datatable', [UserController::class, 'datatable'])->name('users.datatable'); @@ -125,36 +133,36 @@ Route::post('users/togglesuspend/{user}', [UserController::class, 'toggleSuspended'])->name('users.togglesuspend'); Route::resource('users', UserController::class); - #servers + //servers Route::get('servers/datatable', [AdminServerController::class, 'datatable'])->name('servers.datatable'); Route::post('servers/togglesuspend/{server}', [AdminServerController::class, 'toggleSuspended'])->name('servers.togglesuspend'); Route::get('servers/sync', [AdminServerController::class, 'syncServers'])->name('servers.sync'); Route::resource('servers', AdminServerController::class); - #products + //products Route::get('products/datatable', [ProductController::class, 'datatable'])->name('products.datatable'); Route::get('products/clone/{product}', [ProductController::class, 'clone'])->name('products.clone'); Route::patch('products/disable/{product}', [ProductController::class, 'disable'])->name('products.disable'); Route::resource('products', ProductController::class); - #store + //store Route::get('store/datatable', [ShopProductController::class, 'datatable'])->name('store.datatable'); Route::patch('store/disable/{shopProduct}', [ShopProductController::class, 'disable'])->name('store.disable'); Route::resource('store', ShopProductController::class)->parameters([ 'store' => 'shopProduct', ]); - #payments + //payments Route::get('payments/datatable', [PaymentController::class, 'datatable'])->name('payments.datatable'); Route::get('payments', [PaymentController::class, 'index'])->name('payments.index'); - #settings + //settings Route::get('settings/datatable', [SettingsController::class, 'datatable'])->name('settings.datatable'); Route::patch('settings/updatevalue', [SettingsController::class, 'updatevalue'])->name('settings.updatevalue'); - Route::get("settings/checkPteroClientkey", [System::class, 'checkPteroClientkey'])->name('settings.checkPteroClientkey'); - Route::redirect("settings#system", "system")->name('settings.system'); + Route::get('settings/checkPteroClientkey', [System::class, 'checkPteroClientkey'])->name('settings.checkPteroClientkey'); + Route::redirect('settings#system', 'system')->name('settings.system'); - #settings + //settings Route::patch('settings/update/invoice-settings', [Invoices::class, 'updateSettings'])->name('settings.update.invoicesettings'); Route::patch('settings/update/language', [Language::class, 'updateSettings'])->name('settings.update.languagesettings'); Route::patch('settings/update/payment', [Payments::class, 'updateSettings'])->name('settings.update.paymentsettings'); @@ -162,37 +170,42 @@ Route::patch('settings/update/system', [System::class, 'updateSettings'])->name('settings.update.systemsettings'); Route::resource('settings', SettingsController::class)->only('index'); - #invoices - Route::get('invoices/download-invoices', [InvoiceController::class, 'downloadAllInvoices'])->name('invoices.downloadAllInvoices');; + //invoices + Route::get('invoices/download-invoices', [InvoiceController::class, 'downloadAllInvoices'])->name('invoices.downloadAllInvoices'); Route::get('invoices/download-single-invoice', [InvoiceController::class, 'downloadSingleInvoice'])->name('invoices.downloadSingleInvoice'); - #usefullinks + //usefullinks Route::get('usefullinks/datatable', [UsefulLinkController::class, 'datatable'])->name('usefullinks.datatable'); Route::resource('usefullinks', UsefulLinkController::class); - #vouchers + //vouchers Route::get('vouchers/datatable', [VoucherController::class, 'datatable'])->name('vouchers.datatable'); Route::get('vouchers/{voucher}/usersdatatable', [VoucherController::class, 'usersdatatable'])->name('vouchers.usersdatatable'); Route::get('vouchers/{voucher}/users', [VoucherController::class, 'users'])->name('vouchers.users'); Route::resource('vouchers', VoucherController::class); - #api-keys + //partners + Route::get('partners/datatable', [PartnerController::class, 'datatable'])->name('partners.datatable'); + Route::get('partners/{voucher}/users', [PartnerController::class, 'users'])->name('partners.users'); + Route::resource('partners', PartnerController::class); + + //api-keys Route::get('api/datatable', [ApplicationApiController::class, 'datatable'])->name('api.datatable'); Route::resource('api', ApplicationApiController::class)->parameters([ 'api' => 'applicationApi', ]); }); - #mod + //mod Route::prefix('moderator')->name('moderator.')->middleware('moderator')->group(function () { - #ticket moderation + //ticket moderation Route::get('ticket', [ModTicketsController::class, 'index'])->name('ticket.index'); Route::get('ticket/datatable', [ModTicketsController::class, 'datatable'])->name('ticket.datatable'); Route::get('ticket/show/{ticket_id}', [ModTicketsController::class, 'show'])->name('ticket.show'); Route::post('ticket/reply', [ModTicketsController::class, 'reply'])->name('ticket.reply'); Route::post('ticket/close/{ticket_id}', [ModTicketsController::class, 'close'])->name('ticket.close'); Route::post('ticket/delete/{ticket_id}', [ModTicketsController::class, 'delete'])->name('ticket.delete'); - #ticket moderation blacklist + //ticket moderation blacklist Route::get('ticket/blacklist', [ModTicketsController::class, 'blacklist'])->name('ticket.blacklist'); Route::post('ticket/blacklist', [ModTicketsController::class, 'blacklistAdd'])->name('ticket.blacklist.add'); Route::post('ticket/blacklist/delete/{id}', [ModTicketsController::class, 'blacklistDelete'])->name('ticket.blacklist.delete'); @@ -202,3 +215,5 @@ Route::get('/home', [HomeController::class, 'index'])->name('home'); }); + +require __DIR__ . '/extensions_web.php'; diff --git a/server.php b/server.php deleted file mode 100644 index 5fb6379e7..000000000 --- a/server.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ - -$uri = urldecode( - parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) -); - -// This file allows us to emulate Apache's "mod_rewrite" functionality from the -// built-in PHP web server. This provides a convenient way to test a Laravel -// application without having installed a "real" web server software here. -if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { - return false; -} - -require_once __DIR__.'/public/index.php'; diff --git a/tests/Feature/TestApiAuthorization.php b/tests/Feature/TestApiAuthorization.php index 95feaecdb..efe49cf50 100644 --- a/tests/Feature/TestApiAuthorization.php +++ b/tests/Feature/TestApiAuthorization.php @@ -3,7 +3,6 @@ namespace Tests\Feature; use App\Models\ApplicationApi; - use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Support\Str; use Tests\TestCase; @@ -14,7 +13,9 @@ class TestApiAuthorization extends TestCase /** * A basic feature test example. + * * @dataProvider ApiRoutesThatRequireAuthorization + * * @return void * @test */ @@ -28,17 +29,18 @@ public function test_api_route_without_auth_headers(string $method, string $rout $response->assertJson(['message' => 'Missing Authorization header']); } - /** * A basic feature test example. + * * @dataProvider ApiRoutesThatRequireAuthorization + * * @return void */ public function test_api_route_with_auth_headers_but_invalid_token(string $method, string $route) { $response = $this->withHeaders([ 'Accept' => 'application/json', - 'Authorization' => 'Bearer ' . Str::random(48) + 'Authorization' => 'Bearer '.Str::random(48), ])->{$method}($route); $response->assertStatus(401); @@ -47,7 +49,9 @@ public function test_api_route_with_auth_headers_but_invalid_token(string $metho /** * A basic feature test example. + * * @dataProvider ApiRoutesThatRequireAuthorization + * * @return void */ public function test_api_route_with_valid_auth_headers(string $method, string $route) @@ -56,7 +60,7 @@ public function test_api_route_with_valid_auth_headers(string $method, string $r $response = $this->withHeaders([ 'Accept' => 'application/json', - 'Authorization' => 'Bearer ' . $applicationApi->token + 'Authorization' => 'Bearer '.$applicationApi->token, ])->{$method}($route); $response->assertStatus(200); @@ -72,7 +76,7 @@ public function ApiRoutesThatRequireAuthorization(): array 'List Servers' => [ 'method' => 'get', 'route' => '/api/servers', - ] + ], ]; } } diff --git a/tests/Feature/TestUsefulLinksController.php b/tests/Feature/TestUsefulLinksController.php index 93be5c3f8..4700bc45a 100644 --- a/tests/Feature/TestUsefulLinksController.php +++ b/tests/Feature/TestUsefulLinksController.php @@ -10,7 +10,6 @@ /** * Class TestUsefulLinksController - * @package Tests\Feature */ class TestUsefulLinksController extends TestCase { @@ -18,19 +17,20 @@ class TestUsefulLinksController extends TestCase /** * @dataProvider accessibleRoutesDataProvider - * @param string $method - * @param string $route - * @param int $expectedStatus + * + * @param string $method + * @param string $route + * @param int $expectedStatus */ - function test_accessible_routes(string $method, string $route, int $expectedStatus) + public function test_accessible_routes(string $method, string $route, int $expectedStatus) { UsefulLink::factory()->create([ - 'id' => 1 + 'id' => 1, ]); $response = $this->actingAs(User::factory()->create([ 'role' => 'admin', - 'pterodactyl_id' => '1' + 'pterodactyl_id' => '1', ]))->{$method}($route); $response->assertStatus($expectedStatus); @@ -38,16 +38,20 @@ function test_accessible_routes(string $method, string $route, int $expectedStat /** * @dataProvider usefulLinkDataProvider - * @param array $dataSet - * @param int $expectedCount - * @param bool $assertValidationErrors + * + * @param array $dataSet + * @param int $expectedCount + * @param bool $assertValidationErrors */ - function test_creating_useful_link(array $dataSet, int $expectedCount, bool $assertValidationErrors) + public function test_creating_useful_link(array $dataSet, int $expectedCount, bool $assertValidationErrors) { $response = $this->actingAs($this->getTestUser())->post(route('admin.usefullinks.store'), $dataSet); - if ($assertValidationErrors) $response->assertSessionHasErrors(); - else $response->assertSessionHasNoErrors(); + if ($assertValidationErrors) { + $response->assertSessionHasErrors(); + } else { + $response->assertSessionHasNoErrors(); + } $response->assertRedirect(); $this->assertDatabaseCount('useful_links', $expectedCount); @@ -55,32 +59,33 @@ function test_creating_useful_link(array $dataSet, int $expectedCount, bool $ass /** * @dataProvider usefulLinkDataProvider - * @param array $dataSet - * @param int $expectedCount - * @param bool $assertValidationErrors + * + * @param array $dataSet + * @param int $expectedCount + * @param bool $assertValidationErrors */ - function test_updating_useful_link(array $dataSet, int $expectedCount, bool $assertValidationErrors) + public function test_updating_useful_link(array $dataSet, int $expectedCount, bool $assertValidationErrors) { $link = UsefulLink::factory()->create([ - 'id' => 1 + 'id' => 1, ]); $response = $this->actingAs($this->getTestUser())->patch(route('admin.usefullinks.update', $link->id), $dataSet); - if ($assertValidationErrors) $response->assertSessionHasErrors(); - else $response->assertSessionHasNoErrors(); + if ($assertValidationErrors) { + $response->assertSessionHasErrors(); + } else { + $response->assertSessionHasNoErrors(); + } $response->assertRedirect(); $this->assertDatabaseCount('useful_links', 1); } - /** - * - */ - function test_deleting_useful_link() + public function test_deleting_useful_link() { $link = UsefulLink::factory()->create([ - 'id' => 1 + 'id' => 1, ]); $response = $this->actingAs($this->getTestUser())->delete(route('admin.usefullinks.update', $link->id)); @@ -96,84 +101,84 @@ private function getTestUser(): User { return User::factory()->create([ 'role' => 'admin', - 'pterodactyl_id' => '1' + 'pterodactyl_id' => '1', ]); } /** * @return array */ - function usefulLinkDataProvider(): array + public function usefulLinkDataProvider(): array { return [ 'Valid dataset 1' => [ 'dataSet' => [ - "icon" => "fas fa-user", - "title" => "Bitsec.Dev Dashboard", - "link" => "https://manage.bitsec.dev.com", - "description" => Str::random(1500), + 'icon' => 'fas fa-user', + 'title' => 'Bitsec.Dev Dashboard', + 'link' => 'https://manage.bitsec.dev.com', + 'description' => Str::random(1500), ], 'expectedCount' => 1, - 'assertValidationErrors' => false + 'assertValidationErrors' => false, ], 'Valid dataset 2' => [ 'dataSet' => [ - "icon" => "fas fa-user", - "title" => Str::random(30), - "link" => "https://somerandomsite.com", - "description" => Str::random(1500), + 'icon' => 'fas fa-user', + 'title' => Str::random(30), + 'link' => 'https://somerandomsite.com', + 'description' => Str::random(1500), ], 'expectedCount' => 1, - 'assertValidationErrors' => false + 'assertValidationErrors' => false, ], 'Invalid dataset (invalid link)' => [ 'dataSet' => [ - "icon" => "fas fa-user", - "title" => "Some Random Title", - "link" => "1221", - "description" => "

Some Random HTML

", + 'icon' => 'fas fa-user', + 'title' => 'Some Random Title', + 'link' => '1221', + 'description' => '

Some Random HTML

', ], 'expectedCount' => 0, - 'assertValidationErrors' => true + 'assertValidationErrors' => true, ], 'Invalid dataset (no title)' => [ 'dataSet' => [ - "icon" => "fas fa-user", - "title" => "", - "link" => "https://somerandomsite.com", - "description" => "

Some Random HTML

", + 'icon' => 'fas fa-user', + 'title' => '', + 'link' => 'https://somerandomsite.com', + 'description' => '

Some Random HTML

', ], 'expectedCount' => 0, - 'assertValidationErrors' => true + 'assertValidationErrors' => true, ], 'Invalid dataset (to long title)' => [ 'dataSet' => [ - "icon" => "fas fa-user", - "title" => Str::random(200), - "link" => "https://valid.com", - "description" => "

Some Random HTML

", + 'icon' => 'fas fa-user', + 'title' => Str::random(200), + 'link' => 'https://valid.com', + 'description' => '

Some Random HTML

', ], 'expectedCount' => 0, - 'assertValidationErrors' => true + 'assertValidationErrors' => true, ], 'Invalid dataset (to long description)' => [ 'dataSet' => [ - "icon" => "fas fa-user", - "title" => "Some Random Valid Title", - "link" => "https://valid.com", - "description" => Str::random(2100), + 'icon' => 'fas fa-user', + 'title' => 'Some Random Valid Title', + 'link' => 'https://valid.com', + 'description' => Str::random(2100), ], 'expectedCount' => 0, - 'assertValidationErrors' => true + 'assertValidationErrors' => true, ], 'Invalid dataset (no icon)' => [ 'dataSet' => [ - "title" => "Some Random Valid Title", - "link" => "https://valid.com", - "description" => Str::random(200), + 'title' => 'Some Random Valid Title', + 'link' => 'https://valid.com', + 'description' => Str::random(200), ], 'expectedCount' => 0, - 'assertValidationErrors' => true + 'assertValidationErrors' => true, ], ]; } @@ -187,17 +192,17 @@ public function accessibleRoutesDataProvider(): array 'index page' => [ 'method' => 'get', 'route' => '/admin/usefullinks', - 'expectedStatus' => 200 + 'expectedStatus' => 200, ], 'Create page' => [ 'method' => 'get', 'route' => '/admin/usefullinks/create', - 'expectedStatus' => 200 + 'expectedStatus' => 200, ], 'Edit page' => [ 'method' => 'get', 'route' => '/admin/usefullinks/1/edit', - 'expectedStatus' => 200 + 'expectedStatus' => 200, ], ]; } diff --git a/tests/Feature/TestVouchersController.php b/tests/Feature/TestVouchersController.php index 301880718..07c1ad6a0 100644 --- a/tests/Feature/TestVouchersController.php +++ b/tests/Feature/TestVouchersController.php @@ -10,7 +10,6 @@ /** * Class TestUsefulLinksController - * @package Tests\Feature */ class TestVouchersController extends TestCase { @@ -18,19 +17,20 @@ class TestVouchersController extends TestCase /** * @dataProvider accessibleRoutesDataProvider - * @param string $method - * @param string $route - * @param int $expectedStatus + * + * @param string $method + * @param string $route + * @param int $expectedStatus */ - function test_accessible_routes(string $method, string $route, int $expectedStatus) + public function test_accessible_routes(string $method, string $route, int $expectedStatus) { Voucher::factory()->create([ - 'id' => 1 + 'id' => 1, ]); $response = $this->actingAs(User::factory()->create([ - 'role' => 'admin', - 'pterodactyl_id' => '1' + 'role' => 'admin', + 'pterodactyl_id' => '1', ]))->{$method}($route); $response->assertStatus($expectedStatus); @@ -38,16 +38,20 @@ function test_accessible_routes(string $method, string $route, int $expectedStat /** * @dataProvider VoucherDataProvider - * @param array $dataSet - * @param int $expectedCount - * @param bool $assertValidationErrors + * + * @param array $dataSet + * @param int $expectedCount + * @param bool $assertValidationErrors */ - function test_creating_vouchers(array $dataSet, int $expectedCount, bool $assertValidationErrors) + public function test_creating_vouchers(array $dataSet, int $expectedCount, bool $assertValidationErrors) { $response = $this->actingAs($this->getTestUser())->post(route('admin.vouchers.store'), $dataSet); - if ($assertValidationErrors) $response->assertSessionHasErrors(); - else $response->assertSessionHasNoErrors(); + if ($assertValidationErrors) { + $response->assertSessionHasErrors(); + } else { + $response->assertSessionHasNoErrors(); + } $response->assertRedirect(); $this->assertDatabaseCount('vouchers', $expectedCount); @@ -59,39 +63,40 @@ function test_creating_vouchers(array $dataSet, int $expectedCount, bool $assert private function getTestUser(): User { return User::factory()->create([ - 'role' => 'admin', - 'pterodactyl_id' => '1' + 'role' => 'admin', + 'pterodactyl_id' => '1', ]); } /** * @dataProvider VoucherDataProvider - * @param array $dataSet - * @param int $expectedCount - * @param bool $assertValidationErrors + * + * @param array $dataSet + * @param int $expectedCount + * @param bool $assertValidationErrors */ - function test_updating_voucher(array $dataSet, int $expectedCount, bool $assertValidationErrors) + public function test_updating_voucher(array $dataSet, int $expectedCount, bool $assertValidationErrors) { $voucher = Voucher::factory()->create([ - 'id' => 1 + 'id' => 1, ]); $response = $this->actingAs($this->getTestUser())->patch(route('admin.vouchers.update', $voucher->id), $dataSet); - if ($assertValidationErrors) $response->assertSessionHasErrors(); - else $response->assertSessionHasNoErrors(); + if ($assertValidationErrors) { + $response->assertSessionHasErrors(); + } else { + $response->assertSessionHasNoErrors(); + } $response->assertRedirect(); $this->assertDatabaseCount('vouchers', 1); } - /** - * - */ - function test_deleting_vouchers() + public function test_deleting_vouchers() { $voucher = Voucher::factory()->create([ - 'id' => 1 + 'id' => 1, ]); $response = $this->actingAs($this->getTestUser())->delete(route('admin.vouchers.update', $voucher->id)); @@ -103,193 +108,192 @@ function test_deleting_vouchers() /** * @return array */ - function VoucherDataProvider(): array + public function VoucherDataProvider(): array { return [ - 'Valid dataset 1' => [ - 'dataSet' => [ - "memo" => "TESTING", - "code" => Str::random(20), - "credits" => 500, - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'Valid dataset 1' => [ + 'dataSet' => [ + 'memo' => 'TESTING', + 'code' => Str::random(20), + 'credits' => 500, + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 1, - 'assertValidationErrors' => false + 'expectedCount' => 1, + 'assertValidationErrors' => false, ], - 'Valid dataset 2' => [ - 'dataSet' => [ - "code" => Str::random(36), - "credits" => 500, - "uses" => 500, + 'Valid dataset 2' => [ + 'dataSet' => [ + 'code' => Str::random(36), + 'credits' => 500, + 'uses' => 500, ], - 'expectedCount' => 1, - 'assertValidationErrors' => false + 'expectedCount' => 1, + 'assertValidationErrors' => false, ], - 'Valid dataset 3' => [ - 'dataSet' => [ - "memo" => "TESTING", - "code" => Str::random(4), - "credits" => 1000000, - "uses" => 1, - "expires_at" => now()->addYears(6)->format('d-m-Y'), + 'Valid dataset 3' => [ + 'dataSet' => [ + 'memo' => 'TESTING', + 'code' => Str::random(4), + 'credits' => 1000000, + 'uses' => 1, + 'expires_at' => now()->addYears(6)->format('d-m-Y'), ], - 'expectedCount' => 1, - 'assertValidationErrors' => false + 'expectedCount' => 1, + 'assertValidationErrors' => false, ], 'Invalid dataset (memo to long)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(20), - "credits" => 500, - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(20), + 'credits' => 500, + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (code to short)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 500, - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 500, + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (code missing)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "credits" => 500, - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'credits' => 500, + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (code to long)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(60), - "credits" => 500, - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(60), + 'credits' => 500, + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (credits missing)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (0 credits)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 0, - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 0, + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (to many credits)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "uses" => 500, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'uses' => 500, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (uses missing)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (0 uses)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "uses" => 0, - "expires_at" => now()->addDay()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'uses' => 0, + 'expires_at' => now()->addDay()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (expires_at today)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "uses" => 500, - "expires_at" => now()->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'uses' => 500, + 'expires_at' => now()->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (expires_at earlier)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "uses" => 500, - "expires_at" => now()->subDays(5)->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'uses' => 500, + 'expires_at' => now()->subDays(5)->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (expires_at to far)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "uses" => 500, - "expires_at" => now()->addYears(100)->format('d-m-Y'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'uses' => 500, + 'expires_at' => now()->addYears(100)->format('d-m-Y'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (expires_at invalid format 1)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "uses" => 500, - "expires_at" => now()->addYears(100)->format('Y-m-d'), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'uses' => 500, + 'expires_at' => now()->addYears(100)->format('Y-m-d'), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], 'Invalid dataset (expires_at invalid value)' => [ - 'dataSet' => [ - "memo" => Str::random(250), - "code" => Str::random(1), - "credits" => 99999999999, - "uses" => 500, - "expires_at" => Str::random(20), + 'dataSet' => [ + 'memo' => Str::random(250), + 'code' => Str::random(1), + 'credits' => 99999999999, + 'uses' => 500, + 'expires_at' => Str::random(20), ], - 'expectedCount' => 0, - 'assertValidationErrors' => true + 'expectedCount' => 0, + 'assertValidationErrors' => true, ], ]; - } /** @@ -298,20 +302,20 @@ function VoucherDataProvider(): array public function accessibleRoutesDataProvider(): array { return [ - 'index page' => [ - 'method' => 'get', - 'route' => '/admin/vouchers', - 'expectedStatus' => 200 + 'index page' => [ + 'method' => 'get', + 'route' => '/admin/vouchers', + 'expectedStatus' => 200, ], 'Create page' => [ - 'method' => 'get', - 'route' => '/admin/vouchers/create', - 'expectedStatus' => 200 + 'method' => 'get', + 'route' => '/admin/vouchers/create', + 'expectedStatus' => 200, ], - 'Edit page' => [ - 'method' => 'get', - 'route' => '/admin/vouchers/1/edit', - 'expectedStatus' => 200 + 'Edit page' => [ + 'method' => 'get', + 'route' => '/admin/vouchers/1/edit', + 'expectedStatus' => 200, ], ]; } diff --git a/tests/Unit/TestUserCommand.php b/tests/Unit/TestUserCommand.php index 6ea4d3833..0c74a999b 100644 --- a/tests/Unit/TestUserCommand.php +++ b/tests/Unit/TestUserCommand.php @@ -12,9 +12,11 @@ class TestUserCommand extends TestCase /** * A basic feature test example. + * * @dataProvider invalidPteroIdDataProvider - * @param array $apiResponse - * @param int $expectedExitCode + * + * @param array $apiResponse + * @param int $expectedExitCode * @return void */ public function testMakeUserCommand(array $apiResponse, int $expectedExitCode): void @@ -37,14 +39,14 @@ public function invalidPteroIdDataProvider(): array 'apiResponse' => [ 'id' => 12345, 'first_name' => 'Test', - 'email' => 'test@test.test' + 'email' => 'test@test.test', ], - 'expectedExitCode' => 1 + 'expectedExitCode' => 1, ], 'Bad Response' => [ 'apiResponse' => [], - 'expectedExitCode' => 0 - ] + 'expectedExitCode' => 0, + ], ]; } } diff --git a/resources/css/adminlte.min.css b/themes/default/css/adminlte.min.css similarity index 100% rename from resources/css/adminlte.min.css rename to themes/default/css/adminlte.min.css diff --git a/resources/css/slim.min.css b/themes/default/css/slim.min.css similarity index 100% rename from resources/css/slim.min.css rename to themes/default/css/slim.min.css diff --git a/resources/css/stylesheet.css b/themes/default/css/stylesheet.css similarity index 100% rename from resources/css/stylesheet.css rename to themes/default/css/stylesheet.css diff --git a/resources/js/adminlte.js b/themes/default/js/adminlte.js similarity index 100% rename from resources/js/adminlte.js rename to themes/default/js/adminlte.js diff --git a/resources/js/alpine.js b/themes/default/js/alpine.js similarity index 100% rename from resources/js/alpine.js rename to themes/default/js/alpine.js diff --git a/resources/js/app.js b/themes/default/js/app.js similarity index 100% rename from resources/js/app.js rename to themes/default/js/app.js diff --git a/resources/js/bootstrap.js b/themes/default/js/bootstrap.js similarity index 100% rename from resources/js/bootstrap.js rename to themes/default/js/bootstrap.js diff --git a/resources/js/jquery.js b/themes/default/js/jquery.js similarity index 100% rename from resources/js/jquery.js rename to themes/default/js/jquery.js diff --git a/resources/js/slim.kickstart.min.js b/themes/default/js/slim.kickstart.min.js similarity index 100% rename from resources/js/slim.kickstart.min.js rename to themes/default/js/slim.kickstart.min.js diff --git a/themes/default/sass/_variables.scss b/themes/default/sass/_variables.scss new file mode 100644 index 000000000..0407ab577 --- /dev/null +++ b/themes/default/sass/_variables.scss @@ -0,0 +1,19 @@ +// Body +$body-bg: #f8fafc; + +// Typography +$font-family-sans-serif: 'Nunito', sans-serif; +$font-size-base: 0.9rem; +$line-height-base: 1.6; + +// Colors +$blue: #3490dc; +$indigo: #6574cd; +$purple: #9561e2; +$pink: #f66d9b; +$red: #e3342f; +$orange: #f6993f; +$yellow: #ffed4a; +$green: #38c172; +$teal: #4dc0b5; +$cyan: #6cb2eb; diff --git a/resources/sass/app.scss b/themes/default/sass/app.scss similarity index 100% rename from resources/sass/app.scss rename to themes/default/sass/app.scss diff --git a/resources/views/admin/activitylogs/index.blade.php b/themes/default/views/admin/activitylogs/index.blade.php similarity index 96% rename from resources/views/admin/activitylogs/index.blade.php rename to themes/default/views/admin/activitylogs/index.blade.php index e0eedc6f6..822b06d68 100644 --- a/resources/views/admin/activitylogs/index.blade.php +++ b/themes/default/views/admin/activitylogs/index.blade.php @@ -33,7 +33,7 @@ @else

{{ __('No recent activity from cronjobs')}}

-

{{ __('Are cronjobs running?')}} {{ __('Check the docs for it here')}}

+

{{ __('Are cronjobs running?')}} {{ __('Check the docs for it here')}}

@endif diff --git a/resources/views/admin/api/create.blade.php b/themes/default/views/admin/api/create.blade.php similarity index 100% rename from resources/views/admin/api/create.blade.php rename to themes/default/views/admin/api/create.blade.php diff --git a/resources/views/admin/api/edit.blade.php b/themes/default/views/admin/api/edit.blade.php similarity index 100% rename from resources/views/admin/api/edit.blade.php rename to themes/default/views/admin/api/edit.blade.php diff --git a/resources/views/admin/api/index.blade.php b/themes/default/views/admin/api/index.blade.php similarity index 100% rename from resources/views/admin/api/index.blade.php rename to themes/default/views/admin/api/index.blade.php diff --git a/resources/views/admin/nests/index.blade.php b/themes/default/views/admin/nests/index.blade.php similarity index 100% rename from resources/views/admin/nests/index.blade.php rename to themes/default/views/admin/nests/index.blade.php diff --git a/resources/views/admin/nodes/index.blade.php b/themes/default/views/admin/nodes/index.blade.php similarity index 100% rename from resources/views/admin/nodes/index.blade.php rename to themes/default/views/admin/nodes/index.blade.php diff --git a/resources/views/admin/overview/index.blade.php b/themes/default/views/admin/overview/index.blade.php similarity index 68% rename from resources/views/admin/overview/index.blade.php rename to themes/default/views/admin/overview/index.blade.php index 6fca37308..062b50c66 100644 --- a/resources/views/admin/overview/index.blade.php +++ b/themes/default/views/admin/overview/index.blade.php @@ -8,6 +8,7 @@

{{__('Admin Overview')}}

+
+ @if(Storage::get('latestVersion') && config("app.version") < Storage::get('latestVersion')) + + @endif @@ -50,7 +59,7 @@ class="fas fa-money-bill mr-2"> {{__('Support ControlPanel')}}
{{__('Servers')}} - {{$counters['servers']->total}} + {{$counters['servers']->active}}/{{$counters['servers']->total}}
@@ -171,7 +180,7 @@ class="fas fa-sync mr-2">{{__('Sync')}} - + @foreach($tickets as $ticket_id => $ticket) #{{$ticket_id}} - {{$ticket->title}} @@ -180,7 +189,7 @@ class="fas fa-sync mr-2">{{__('Sync')}} {{$ticket->last_updated}} @endforeach - + @endif @@ -254,6 +263,7 @@ class="fas fa-sync mr-2">{{__('Sync servers')}} +
@@ -266,32 +276,36 @@ class="fas fa-sync mr-2">{{__('Sync servers')}}
-
- {{__('Last month')}}: - - - - - - - - - - - - @foreach($counters['payments']['lastMonth'] as $currency => $income) - - - - - - @endforeach - -
{{__('Currency')}}{{__('Number of payments')}}{{__('Total income')}}
{{$currency}}{{$income->count}}{{$income->total}}
-
-
+ @if($counters['payments']['lastMonth']->count()) +
+ {{__('Last month')}}: + + + + + + + + + + + + @foreach($counters['payments']['lastMonth'] as $currency => $income) + + + + + + @endforeach + +
{{__('Currency')}}{{__('Number of payments')}}{{__('Total amount')}}
{{$currency}}{{$income->count}}{{$income->total}}
+
+
+ @endif + @if($counters['payments']['lastMonth']->count())
+ @else
@endif {{__('This month')}}: {{__('Currency')}} {{__('Number of payments')}} - {{__('Total income')}} + {{__('Total amount')}} @@ -318,7 +332,76 @@ class="fas fa-info-circle">
- + +
+
+
+
+
+
+ {{__('Tax overview')}} +
+
+
+
+ @if($counters['taxPayments']['lastYear']->count()) + {{__('Last year')}}: + + + + + + + + + + + + + + @foreach($counters['taxPayments']['lastYear'] as $currency => $income) + + + + + + + + @endforeach + +
{{__('Currency')}}{{__('Number of payments')}}{{__('Base amount')}}{{__('Total taxes')}}{{__('Total amount')}}
{{$currency}}{{$income->count}}{{$income->price}}{{$income->taxes}}{{$income->total}}
+
+ @endif + {{__('This year')}}: + + + + + + + + + + + + + + @foreach($counters['taxPayments']['thisYear'] as $currency => $income) + + + + + + + + @endforeach + +
{{__('Currency')}}{{__('Number of payments')}}{{__('Base amount')}}{{__('Total taxes')}}{{__('Total amount')}}
{{$currency}}{{$income->count}}{{$income->price}}{{$income->taxes}}{{$income->total}}
+
diff --git a/themes/default/views/admin/partners/create.blade.php b/themes/default/views/admin/partners/create.blade.php new file mode 100644 index 000000000..f635e51ba --- /dev/null +++ b/themes/default/views/admin/partners/create.blade.php @@ -0,0 +1,147 @@ +@extends('layouts.main') + +@section('content') + +
+
+
+
+

{{__('Vouchers')}}

+
+ +
+
+
+ + + +
+
+ +
+
+
+
+
+ {{__('Partner details')}} +
+
+
+ + @csrf + +
+ + + @error('user') +
+ {{$message}} +
+ @enderror +
+ +
+ + + @error('partner_discount') +
+ {{$message}} +
+ @enderror +
+ + +
+ +
+ +
+ @error('registered_user_discount') +
+ {{$message}} +
+ @enderror +
+ +
+ + + @error('referral_system_commission') +
+ {{$message}} +
+ @enderror +
+ +
+ +
+ +
+
+
+
+ + + +
+
+ + + + + + +@endsection \ No newline at end of file diff --git a/themes/default/views/admin/partners/edit.blade.php b/themes/default/views/admin/partners/edit.blade.php new file mode 100644 index 000000000..289edf5ba --- /dev/null +++ b/themes/default/views/admin/partners/edit.blade.php @@ -0,0 +1,166 @@ +@extends('layouts.main') + +@section('content') + +
+
+
+
+

{{__('Partners')}}

+
+ +
+
+
+ + + +
+
+ +
+
+
+
+
+ {{__('Partner details')}} +
+
+
+
+ @csrf + @method('PATCH') + +
+ + + @error('user') +
+ {{$message}} +
+ @enderror +
+ +
+ + + @error('partner_discount') +
+ {{$message}} +
+ @enderror +
+ + +
+ +
+ +
+ @error('registered_user_discount') +
+ {{$message}} +
+ @enderror +
+ +
+ + + @error('referral_system_commission') +
+ {{$message}} +
+ @enderror +
+ +
+ +
+
+
+
+
+
+ +
+
+ + + + + + +@endsection \ No newline at end of file diff --git a/themes/default/views/admin/partners/index.blade.php b/themes/default/views/admin/partners/index.blade.php new file mode 100644 index 000000000..59369b014 --- /dev/null +++ b/themes/default/views/admin/partners/index.blade.php @@ -0,0 +1,94 @@ +@extends('layouts.main') + +@section('content') + +
+
+
+
+

{{__('Partners')}}

+
+ +
+
+
+ + + +
+
+ +
+ +
+
+
{{__('Partners')}}
+ {{__('Create new')}} +
+
+ +
+ + + + + + + + + + + + + + +
{{__('User')}}{{__('Partner discount')}}{{__('Registered user discount')}}{{__('Referral system commission')}}{{__('Created')}}{{__('Actions')}}
+ +
+
+ + +
+ + +
+ + + + + + +@endsection \ No newline at end of file diff --git a/resources/views/admin/payments/index.blade.php b/themes/default/views/admin/payments/index.blade.php similarity index 96% rename from resources/views/admin/payments/index.blade.php rename to themes/default/views/admin/payments/index.blade.php index 69f09a44b..5e1096ae6 100644 --- a/resources/views/admin/payments/index.blade.php +++ b/themes/default/views/admin/payments/index.blade.php @@ -39,12 +39,12 @@ class="btn btn-info">{{ __('Download all Invoices') }} {{ __('ID') }} {{ __('Type') }} + {{ __('User') }} {{ __('Amount') }} {{ __('Product Price') }} {{ __('Tax Value') }} {{ __('Tax Percentage') }} {{ __('Total Price') }} - {{ __('User') }} {{ __('Payment ID') }} {{ __('Payment Method') }} {{ __('Created at') }} @@ -73,19 +73,19 @@ class="btn btn-info">{{ __('Download all Invoices') }} serverSide: true, stateSave: true, ajax: "{{ route('admin.payments.datatable') }}", - order: [[ 9, "desc" ]], + order: [[ 10, "desc" ]], columns: [ {data: 'id',name: 'payments.id'}, {data: 'type'}, + {data: 'user'}, {data: 'amount'}, {data: 'price'}, {data: 'tax_value'}, {data: 'tax_percent'}, {data: 'total_price'}, - {data: 'user'}, {data: 'payment_id'}, {data: 'payment_method'}, - {data: 'created_at'}, + {data: 'created_at', type: 'num', render: {_: 'display', sort: 'raw'}}, {data: 'actions' , sortable : false}, ], fnDrawCallback: function(oSettings) { diff --git a/resources/views/admin/products/create.blade.php b/themes/default/views/admin/products/create.blade.php similarity index 100% rename from resources/views/admin/products/create.blade.php rename to themes/default/views/admin/products/create.blade.php diff --git a/resources/views/admin/products/edit.blade.php b/themes/default/views/admin/products/edit.blade.php similarity index 100% rename from resources/views/admin/products/edit.blade.php rename to themes/default/views/admin/products/edit.blade.php diff --git a/resources/views/admin/products/index.blade.php b/themes/default/views/admin/products/index.blade.php similarity index 97% rename from resources/views/admin/products/index.blade.php rename to themes/default/views/admin/products/index.blade.php index 30d2b712f..bc15a70b4 100644 --- a/resources/views/admin/products/index.blade.php +++ b/themes/default/views/admin/products/index.blade.php @@ -52,6 +52,7 @@ class="fas fa-plus mr-1">{{__('Create new')}} {{__('Backups')}} {{__('Nodes')}} {{__('Eggs')}} + {{__('Min Credits')}} {{__('Servers')}} {{__('Created at')}} @@ -99,6 +100,7 @@ function submitResult() { {data: "backups"}, {data: "nodes", sortable: false}, {data: "eggs", sortable: false}, + {data: "minimum_credits"}, {data: "servers", sortable: false}, {data: "created_at"}, {data: "actions", sortable: false} diff --git a/resources/views/admin/products/show.blade.php b/themes/default/views/admin/products/show.blade.php similarity index 100% rename from resources/views/admin/products/show.blade.php rename to themes/default/views/admin/products/show.blade.php diff --git a/themes/default/views/admin/servers/edit.blade.php b/themes/default/views/admin/servers/edit.blade.php new file mode 100644 index 000000000..e3b9854f0 --- /dev/null +++ b/themes/default/views/admin/servers/edit.blade.php @@ -0,0 +1,93 @@ +@extends('layouts.main') + +@section('content') + +
+
+
+
{{ __('ATTENTION!') }}
+ {{ __('Only edit these settings if you know exactly what you are doing ') }} +
+ {{ __('You usually do not need to change anything here') }} +
+
+
+ +

{{ __('Edit Server') }}

+
+ +
+
+
+ + + +
+
+ +
+
+
+
+
+ @csrf + @method('PATCH') +
+ + + @error('identifier') +
+ {{ $message }} +
+ @enderror +
+ +
+ + + @error('user_id') +
+ {{ $message }} +
+ @enderror +
+ + + +
+
+
+ +
+
+ + +
+ +@endsection diff --git a/resources/views/admin/servers/index.blade.php b/themes/default/views/admin/servers/index.blade.php similarity index 100% rename from resources/views/admin/servers/index.blade.php rename to themes/default/views/admin/servers/index.blade.php diff --git a/resources/views/admin/servers/table.blade.php b/themes/default/views/admin/servers/table.blade.php similarity index 100% rename from resources/views/admin/servers/table.blade.php rename to themes/default/views/admin/servers/table.blade.php diff --git a/resources/views/admin/settings/index.blade.php b/themes/default/views/admin/settings/index.blade.php similarity index 100% rename from resources/views/admin/settings/index.blade.php rename to themes/default/views/admin/settings/index.blade.php diff --git a/resources/views/admin/settings/tabs/invoices.blade.php b/themes/default/views/admin/settings/tabs/invoices.blade.php similarity index 99% rename from resources/views/admin/settings/tabs/invoices.blade.php rename to themes/default/views/admin/settings/tabs/invoices.blade.php index 27faef7cb..cd81363d9 100644 --- a/resources/views/admin/settings/tabs/invoices.blade.php +++ b/themes/default/views/admin/settings/tabs/invoices.blade.php @@ -18,7 +18,7 @@ class="form-control @error('company-name') is-invalid @enderror">
- + @@ -49,7 +49,7 @@ class="form-control @error('company-vat') is-invalid @enderror">
- + diff --git a/resources/views/admin/settings/tabs/language.blade.php b/themes/default/views/admin/settings/tabs/language.blade.php similarity index 100% rename from resources/views/admin/settings/tabs/language.blade.php rename to themes/default/views/admin/settings/tabs/language.blade.php diff --git a/resources/views/admin/settings/tabs/misc.blade.php b/themes/default/views/admin/settings/tabs/misc.blade.php similarity index 85% rename from resources/views/admin/settings/tabs/misc.blade.php rename to themes/default/views/admin/settings/tabs/misc.blade.php index 48b505c88..0a706fce5 100644 --- a/resources/views/admin/settings/tabs/misc.blade.php +++ b/themes/default/views/admin/settings/tabs/misc.blade.php @@ -69,7 +69,7 @@ class="form-control @error('mailencryption') is-invalid @enderror">
- + @@ -222,6 +222,20 @@ class="form-control @error('recaptcha-secret-key') is-invalid @enderror">
+
+
+
+ + +
+
+
+
+ type="number" min="0" max="99999999" value="{{ config('SETTINGS::REFERRAL:PERCENTAGE') }}" + class="form-control @error('referral_percentage') is-invalid @enderror">
+ type="number" min="0" max="99999999" value="{{ config('SETTINGS::REFERRAL::REWARD') }}" + class="form-control @error('referral_reward') is-invalid @enderror">
@@ -283,6 +297,23 @@ class="form-control @error('referral_reward') is-invalid @enderror">
+
+ + +
diff --git a/resources/views/admin/settings/tabs/payment.blade.php b/themes/default/views/admin/settings/tabs/payment.blade.php similarity index 99% rename from resources/views/admin/settings/tabs/payment.blade.php rename to themes/default/views/admin/settings/tabs/payment.blade.php index beaf78bd7..f5f0f8cf9 100644 --- a/resources/views/admin/settings/tabs/payment.blade.php +++ b/themes/default/views/admin/settings/tabs/payment.blade.php @@ -130,7 +130,7 @@ class="form-control @error('stripe-methods') is-invalid @enderror"> data-content="Tax Value that will be added to the total price of the order.

Example: 19 results in (19%)" class="fas fa-info-circle"> - diff --git a/resources/views/admin/settings/tabs/system.blade.php b/themes/default/views/admin/settings/tabs/system.blade.php similarity index 54% rename from resources/views/admin/settings/tabs/system.blade.php rename to themes/default/views/admin/settings/tabs/system.blade.php index c74c79993..dc1231afc 100644 --- a/resources/views/admin/settings/tabs/system.blade.php +++ b/themes/default/views/admin/settings/tabs/system.blade.php @@ -1,3 +1,4 @@ +
@@ -13,6 +14,45 @@
+
+
+
+ + +
+ ') }}" + class="fas fa-info-circle"> +
+
+
+
+
+ + +
+ ') }}" + class="fas fa-info-circle"> +
+
+
+
+
+ + +
+ ') }}" + class="fas fa-info-circle"> +
+
@@ -26,6 +66,7 @@ class="fas fa-info-circle">
+
@@ -73,7 +114,7 @@ class="form-control @error('pterodactyl-url') is-invalid @enderror" required>
-
@@ -94,21 +135,24 @@ class="form-control @error('pterodactyl-api-key') is-invalid @enderror" required
- + + data-content="{{ __('Enter the Client-API Key to a Pterodactyl-Admin-User here.') }}" + class="fas fa-info-circle">
- + @error('pterodactyl-admin-api-key') -
- {{$message}} -
+
+ {{ $message }} +
@enderror
- +
@@ -146,21 +190,20 @@ class="form-control @error('pterodactyl-admin-api-key') is-invalid @enderror" re
-
-
- +
@@ -168,30 +211,30 @@ class="form-control @error('credits-reward-amount-discord') is-invalid @enderror
- +
@@ -236,36 +279,87 @@ class="fas fa-info-circle">
- +
-
+
+
+ + +
+ +
-
- - {{-- Design --}} -
-
-
-

{{ __('Design') }}

+
+
+

{{ __('SEO') }}

+
+
+
+
+
+ +
+
- - +
+ + +
+
+
+
+ + + + {{-- Design --}} +
+
+
+

{{ __('Design') }}

+
+
+
+ + +
+
+ + +
- - + +
@error('icon') @@ -275,14 +369,15 @@ class="form-control @error('allocation-limit') is-invalid @enderror" required>
- - + +
@error('logo') - - {{ $message }} - + + {{ $message }} + @enderror
@@ -300,9 +395,94 @@ class="form-control @error('allocation-limit') is-invalid @enderror" required> @enderror
+ +
-
- -
+
+
+ {{-- ALERT --}} +
+
+

Alert

+
+
+
+ + +
+ +
+ + +
+ +
+ + + @error('alert-message') +
+ {{ $message }} +
+ @enderror +
+
+
+ {{-- Homepage Text --}} +
+
+

{{__("Message of the day")}}

+
+
+
+ + +
+
+ + +
+ +
+ + + @error('motd-message') +
+ {{ $message }} +
+ @enderror +
+
+
+
+ +
+ + diff --git a/resources/views/admin/store/create.blade.php b/themes/default/views/admin/store/create.blade.php similarity index 100% rename from resources/views/admin/store/create.blade.php rename to themes/default/views/admin/store/create.blade.php diff --git a/resources/views/admin/store/edit.blade.php b/themes/default/views/admin/store/edit.blade.php similarity index 100% rename from resources/views/admin/store/edit.blade.php rename to themes/default/views/admin/store/edit.blade.php diff --git a/resources/views/admin/store/index.blade.php b/themes/default/views/admin/store/index.blade.php similarity index 100% rename from resources/views/admin/store/index.blade.php rename to themes/default/views/admin/store/index.blade.php diff --git a/resources/views/admin/usefullinks/create.blade.php b/themes/default/views/admin/usefullinks/create.blade.php similarity index 100% rename from resources/views/admin/usefullinks/create.blade.php rename to themes/default/views/admin/usefullinks/create.blade.php diff --git a/resources/views/admin/usefullinks/edit.blade.php b/themes/default/views/admin/usefullinks/edit.blade.php similarity index 100% rename from resources/views/admin/usefullinks/edit.blade.php rename to themes/default/views/admin/usefullinks/edit.blade.php diff --git a/resources/views/admin/usefullinks/index.blade.php b/themes/default/views/admin/usefullinks/index.blade.php similarity index 100% rename from resources/views/admin/usefullinks/index.blade.php rename to themes/default/views/admin/usefullinks/index.blade.php diff --git a/resources/views/admin/users/edit.blade.php b/themes/default/views/admin/users/edit.blade.php similarity index 100% rename from resources/views/admin/users/edit.blade.php rename to themes/default/views/admin/users/edit.blade.php diff --git a/resources/views/admin/users/index.blade.php b/themes/default/views/admin/users/index.blade.php similarity index 94% rename from resources/views/admin/users/index.blade.php rename to themes/default/views/admin/users/index.blade.php index b3a0e87fc..b6be7a746 100644 --- a/resources/views/admin/users/index.blade.php +++ b/themes/default/views/admin/users/index.blade.php @@ -77,7 +77,7 @@ function submitResult() { url: '//cdn.datatables.net/plug-ins/1.11.3/i18n/{{config("SETTINGS::LOCALE:DATATABLES")}}.json' }, processing: true, - serverSide: false, //increases loading times too much? change back to "true" if it does + serverSide: true, //why was this set to false before? increased loadingtimes by 10 seconds stateSave: true, ajax: "{{route('admin.users.datatable')}}", order: [[ 11, "asc" ]], @@ -90,10 +90,10 @@ function submitResult() { {data: 'role'}, {data: 'email', name: 'users.email'}, {data: 'credits' , name : 'users.credits'}, - {data: 'servers' , sortable : false}, + {data: 'servers'}, {data: 'referrals'}, {data: 'verified' , sortable : false}, - {data: 'last_seen'}, + {data: 'last_seen', type: 'num', render: {_: 'display', sort: 'raw'}}, {data: 'actions' , sortable : false}, ], fnDrawCallback: function( oSettings ) { diff --git a/resources/views/admin/users/notifications.blade.php b/themes/default/views/admin/users/notifications.blade.php similarity index 100% rename from resources/views/admin/users/notifications.blade.php rename to themes/default/views/admin/users/notifications.blade.php diff --git a/resources/views/admin/users/show.blade.php b/themes/default/views/admin/users/show.blade.php similarity index 100% rename from resources/views/admin/users/show.blade.php rename to themes/default/views/admin/users/show.blade.php diff --git a/resources/views/admin/vouchers/create.blade.php b/themes/default/views/admin/vouchers/create.blade.php similarity index 99% rename from resources/views/admin/vouchers/create.blade.php rename to themes/default/views/admin/vouchers/create.blade.php index a1d576bff..4f28e1912 100644 --- a/resources/views/admin/vouchers/create.blade.php +++ b/themes/default/views/admin/vouchers/create.blade.php @@ -14,7 +14,7 @@ diff --git a/resources/views/admin/vouchers/edit.blade.php b/themes/default/views/admin/vouchers/edit.blade.php similarity index 99% rename from resources/views/admin/vouchers/edit.blade.php rename to themes/default/views/admin/vouchers/edit.blade.php index df7d945bb..11c7c5e35 100644 --- a/resources/views/admin/vouchers/edit.blade.php +++ b/themes/default/views/admin/vouchers/edit.blade.php @@ -14,7 +14,7 @@ diff --git a/resources/views/admin/vouchers/index.blade.php b/themes/default/views/admin/vouchers/index.blade.php similarity index 100% rename from resources/views/admin/vouchers/index.blade.php rename to themes/default/views/admin/vouchers/index.blade.php diff --git a/resources/views/admin/vouchers/users.blade.php b/themes/default/views/admin/vouchers/users.blade.php similarity index 100% rename from resources/views/admin/vouchers/users.blade.php rename to themes/default/views/admin/vouchers/users.blade.php diff --git a/themes/default/views/auth/login.blade.php b/themes/default/views/auth/login.blade.php new file mode 100644 index 000000000..d0f456359 --- /dev/null +++ b/themes/default/views/auth/login.blade.php @@ -0,0 +1,140 @@ +@extends('layouts.app') + +@section('content') + + + + + + {{-- imprint and privacy policy --}} +
+
+ @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true") + {{ __('Imprint') }} | + @endif + @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true") + {{ __('Privacy') }} + @endif + @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true") + | {{ __('Terms of Service') }} + @endif +
+
+ +@endsection diff --git a/resources/views/auth/passwords/confirm.blade.php b/themes/default/views/auth/passwords/confirm.blade.php similarity index 100% rename from resources/views/auth/passwords/confirm.blade.php rename to themes/default/views/auth/passwords/confirm.blade.php diff --git a/themes/default/views/auth/passwords/email.blade.php b/themes/default/views/auth/passwords/email.blade.php new file mode 100644 index 000000000..909d1e14f --- /dev/null +++ b/themes/default/views/auth/passwords/email.blade.php @@ -0,0 +1,85 @@ +@extends('layouts.app') + +@section('content') + + + + + + {{-- imprint and privacy policy --}} +
+
+ @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true") + {{ __('Imprint') }} | + @endif + @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true") + {{ __('Privacy') }} + @endif + @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true") + | {{ __('Terms of Service') }} + @endif +
+
+ +@endsection diff --git a/themes/default/views/auth/passwords/reset.blade.php b/themes/default/views/auth/passwords/reset.blade.php new file mode 100644 index 000000000..1e56b8453 --- /dev/null +++ b/themes/default/views/auth/passwords/reset.blade.php @@ -0,0 +1,96 @@ +@extends('layouts.app') + +@section('content') + + + + + + {{-- imprint and privacy policy --}} +
+
+ @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true") + {{ __('Imprint') }} | + @endif + @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true") + {{ __('Privacy') }} + @endif + @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true") + | {{ __('Terms of Service') }} + @endif +
+
+ +@endsection diff --git a/themes/default/views/auth/register.blade.php b/themes/default/views/auth/register.blade.php new file mode 100644 index 000000000..783508c88 --- /dev/null +++ b/themes/default/views/auth/register.blade.php @@ -0,0 +1,195 @@ +@extends('layouts.app') + +@section('content') + + +
+
+ +
+ @if (!config('SETTINGS::SYSTEM:CREATION_OF_NEW_USERS')) +
+
{{ __('Warning!') }}
+ {{ __('The system administrator has blocked the registration of new users') }} +
+ + @else + + +
+ + @error('ip') + + {{ $message }} + + @enderror + + @error('registered') + + {{ $message }} + + @enderror + @if ($errors->has('ptero_registration_error')) + @foreach ($errors->get('ptero_registration_error') as $err) + + {{ $err }} + + @endforeach + @endif + + @csrf +
+
+ +
+
+ +
+
+
+ @error('name') + + {{ $message }} + + @enderror +
+ + +
+
+ +
+
+ +
+
+
+ @error('email') + + {{ $message }} + + @enderror +
+ +
+
+ +
+
+ +
+
+
+ @error('password') + + {{ $message }} + + @enderror +
+ +
+ +
+
+ +
+
+
+ @if (config('SETTINGS::REFERRAL::ENABLED') == 'true') +
+ +
+
+ +
+
+
+ @endif + @if (config('SETTINGS::RECAPTCHA:ENABLED') == 'true') +
+ {!! htmlFormSnippet() !!} + @error('g-recaptcha-response') + + {{ $message }} + + @enderror +
+ @endif + +
+
+ @if (config('SETTINGS::SYSTEM:SHOW_TOS')) + +
+ + +
+ @error('terms') + + {{ $message }} + + @enderror + + @endif +
+
+ +
+ +
+ +
+ + + {{-- --}} + + {{ __('I already have a membership') }} +
+ +
+ + + + {{-- imprint and privacy policy --}} +
+
+ @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true") + {{ __('Imprint') }} | + @endif + @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true") + {{ __('Privacy') }} + @endif + @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true") + | {{ __('Terms of Service') }} + @endif +
+
+ + @endif +@endsection diff --git a/resources/views/auth/verify.blade.php b/themes/default/views/auth/verify.blade.php similarity index 100% rename from resources/views/auth/verify.blade.php rename to themes/default/views/auth/verify.blade.php diff --git a/resources/views/home.blade.php b/themes/default/views/home.blade.php similarity index 51% rename from resources/views/home.blade.php rename to themes/default/views/home.blade.php index 407b127df..76c4e8e5b 100644 --- a/resources/views/home.blade.php +++ b/themes/default/views/home.blade.php @@ -26,6 +26,12 @@ @endif + + @if(config("SETTINGS::SYSTEM:ALERT_ENABLED") && !empty(config("SETTINGS::SYSTEM:ALERT_MESSAGE"))) + + @endif
@@ -100,6 +106,24 @@ class="info-box-text">{{ __('Out of Credits in', ['credits' => CREDITS_DISPLAY_N
+ @if(config("SETTINGS::SYSTEM:MOTD_ENABLED") == "true") +
+
+

+ + {{ config('app.name', 'MOTD') }} - MOTD +

+
+ +
+ {!! config('SETTINGS::SYSTEM:MOTD_MESSAGE', '') !!} +
+ +
+ @endif + + + @if(config("SETTINGS::SYSTEM:USEFULLINKS_ENABLED") == "true")

@@ -125,6 +149,7 @@ class="info-box-text">{{ __('Out of Credits in', ['credits' => CREDITS_DISPLAY_N

+ @endif
@@ -140,8 +165,7 @@ class="info-box-text">{{ __('Out of Credits in', ['credits' => CREDITS_DISPLAY_N
    - @foreach (Auth::user()->actions()->take(8)->orderBy('created_at', 'desc')->get() - as $log) + @foreach (Auth::user()->actions()->take(8)->orderBy('created_at', 'desc')->get() as $log)
  • @if(str_starts_with($log->description,"created")) @@ -168,6 +192,80 @@ class="info-box-text">{{ __('Out of Credits in', ['credits' => CREDITS_DISPLAY_N
+ @if((config('SETTINGS::REFERRAL::ENABLED') ==true)) +
+
+

+ + {{ __('Partner program') }} +

+
+ +
+ @if((config('SETTINGS::REFERRAL::ALLOWED') == "client" && Auth::user()->role != "member") || config('SETTINGS::REFERRAL::ALLOWED') == "everyone") +
+
+ + + {{__("Your referral URL")}}: + + {{__('Click to copy')}} + + +
+
+ {{__("Number of referred users:")}} {{$numberOfReferrals}} +
+
+ @if($partnerDiscount) +
+ + + + + + + + + + + + + + + + + +
{{__('Your discount')}}{{__('Discount for your new users')}}{{__('Reward per registered user')}}{{__('New user payment commision')}}
{{$partnerDiscount->partner_discount}}%{{$partnerDiscount->registered_user_discount}}%{{config('SETTINGS::REFERRAL::REWARD')}} {{config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME')}}{{($partnerDiscount->referral_system_commission==-1)?config('SETTINGS::REFERRAL:PERCENTAGE'):($partnerDiscount->referral_system_commission)}}%
+
+ @else +
+ + + + + + + + + + + + + +
{{__('Reward per registered user')}}{{__('New user payment commision')}}
{{config('SETTINGS::REFERRAL::REWARD')}} {{config('SETTINGS::SYSTEM:CREDITS_DISPLAY_NAME')}}{{config('SETTINGS::REFERRAL:PERCENTAGE')}}%
+
+ @endif + @else + + {{__("Make a purchase to reveal your referral-URL")}} + @endif +
+ +
+ @endif +
@@ -176,5 +274,41 @@ class="info-box-text">{{ __('Out of Credits in', ['credits' => CREDITS_DISPLAY_N
- + @endsection diff --git a/themes/default/views/information/imprint-content.blade.php b/themes/default/views/information/imprint-content.blade.php new file mode 100644 index 000000000..fb101eeff --- /dev/null +++ b/themes/default/views/information/imprint-content.blade.php @@ -0,0 +1,48 @@ +

+ This website is operated by: +

+ +

+ Company Name
+ Street Name & Number
+ City
+ Country
+ Phone: +00 000 000 000
+ Email: PUT YOUR EMAIL HERE +

+ +

+ Company Registration Number: 00000000
+ VAT Number: 000000000 + +

+ +

+ The European Commission provides a platform for online dispute resolution (OS) which is available at https://ec.europa.eu/consumers/odr/main/index.cfm?event=main.home2.show&lng=EN. + We are not obliged or willing to participate in dispute resolution proceedings before a consumer arbitration board. + +

+ +

+ Disclaimer
+ Liability for Contents
+ The contents of our pages have been created with the utmost care. However, we cannot guarantee the contents' + accuracy, completeness or topicality. According to statutory provisions, we are furthermore responsible for our own + content on these web pages. In this matter, please note that we are not obliged to monitor the transmitted or saved + information of third parties, or investigate circumstances pointing to illegal activity. Our obligations to remove + or block the use of information under generally applicable laws remain unaffected by this as per Ā§Ā§ 8 to 10 of the + Telemedia Act (TMG). + +

+ +

+ Liability for Links
+ Our offer contains links to external third party websites. We have no influence on the contents of those websites, + and therefore cannot assume any liability for these foreign contents. The respective provider or operator of the + pages is always responsible for the contents of the linked pages. The linked pages were checked for possible legal + violations at the time of linking. Illegal contents were not discernible at the time of linking. However, a + permanent content control of the linked pages is not reasonable without concrete evidence of a violation of law. If + we become aware of any infringements, we will remove such links immediately. + +

diff --git a/themes/default/views/information/imprint.blade.php b/themes/default/views/information/imprint.blade.php new file mode 100644 index 000000000..421c98442 --- /dev/null +++ b/themes/default/views/information/imprint.blade.php @@ -0,0 +1,22 @@ +@extends('layouts.app') + +@section('content') + + +
+
+
+
+
+
+ +
+
{{ __('Imprint') }}
+
+ @include('information.imprint-content') +
+
+
+
+ +@endsection diff --git a/themes/default/views/information/privacy-content.blade.php b/themes/default/views/information/privacy-content.blade.php new file mode 100644 index 000000000..af4144858 --- /dev/null +++ b/themes/default/views/information/privacy-content.blade.php @@ -0,0 +1,261 @@ +

Last updated: December 22, 2022

+

This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information + when You use the Service and tells You about Your privacy rights and how the law protects You.

+

We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and + use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the + Free Privacy Policy + Generator.

+

Interpretation and Definitions

+

Interpretation

+

The words of which the initial letter is capitalized have meanings defined under the following conditions. The + following definitions shall have the same meaning regardless of whether they appear in singular or in plural.

+

Definitions

+

For the purposes of this Privacy Policy:

+
    +
  • +

    Account means a unique account created for You to access our Service or parts of our + Service.

    +
  • +
  • +

    Company (referred to as either "the Company", "We", "Us" or + "Our" in this Agreement) refers to controlpanel.

    +
  • +
  • +

    Cookies are small files that are placed on Your computer, mobile device or any other device + by a website, containing the details of Your browsing history on that website among its many uses.

    +
  • +
  • +

    Country refers to: Alabama, United States

    +
  • +
  • +

    Device means any device that can access the Service such as a computer, a cellphone or a + digital tablet.

    +
  • +
  • +

    Personal Data is any information that relates to an identified or identifiable individual. +

    +
  • +
  • +

    Service refers to the Website.

    +
  • +
  • +

    Service Provider means any natural or legal person who processes the data on behalf of the + Company. It refers to third-party companies or individuals employed by the Company to facilitate the + Service, to provide the Service on behalf of the Company, to perform services related to the Service or to + assist the Company in analyzing how the Service is used.

    +
  • +
  • +

    Usage Data refers to data collected automatically, either generated by the use of the + Service or from the Service infrastructure itself (for example, the duration of a page visit).

    +
  • +
  • +

    Website refers to controlpanel, accessible from controlpanel

    +
  • +
  • +

    You means the individual accessing or using the Service, or the company, or other legal + entity on behalf of which such individual is accessing or using the Service, as applicable.

    +
  • +
+

Collecting and Using Your Personal Data

+

Types of Data Collected

+

Personal Data

+

While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be + used to contact or identify You. Personally identifiable information may include, but is not limited to:

+
    +
  • +

    Email address

    +
  • +
  • +

    Usage Data

    +
  • +
+

Usage Data

+

Usage Data is collected automatically when using the Service.

+

Usage Data may include information such as Your Device's Internet Protocol address (e.g. IP address), browser type, + browser version, the pages of our Service that You visit, the time and date of Your visit, the time spent on those + pages, unique device identifiers and other diagnostic data.

+

When You access the Service by or through a mobile device, We may collect certain information automatically, + including, but not limited to, the type of mobile device You use, Your mobile device unique ID, the IP address of + Your mobile device, Your mobile operating system, the type of mobile Internet browser You use, unique device + identifiers and other diagnostic data.

+

We may also collect information that Your browser sends whenever You visit our Service or when You access the Service + by or through a mobile device.

+

Tracking Technologies and Cookies

+

We use Cookies and similar tracking technologies to track the activity on Our Service and store certain information. + Tracking technologies used are beacons, tags, and scripts to collect and track information and to improve and + analyze Our Service. The technologies We use may include:

+
    +
  • Cookies or Browser Cookies. A cookie is a small file placed on Your Device. You can instruct + Your browser to refuse all Cookies or to indicate when a Cookie is being sent. However, if You do not accept + Cookies, You may not be able to use some parts of our Service. Unless you have adjusted Your browser setting so + that it will refuse Cookies, our Service may use Cookies.
  • +
  • Web Beacons. Certain sections of our Service and our emails may contain small electronic files + known as web beacons (also referred to as clear gifs, pixel tags, and single-pixel gifs) that permit the + Company, for example, to count users who have visited those pages or opened an email and for other related + website statistics (for example, recording the popularity of a certain section and verifying system and server + integrity).
  • +
+

Cookies can be "Persistent" or "Session" Cookies. Persistent Cookies remain on Your personal + computer or mobile device when You go offline, while Session Cookies are deleted as soon as You close Your web + browser. Learn more about cookies on the Free Privacy Policy website article.

+

We use both Session and Persistent Cookies for the purposes set out below:

+
    +
  • +

    Necessary / Essential Cookies

    +

    Type: Session Cookies

    +

    Administered by: Us

    +

    Purpose: These Cookies are essential to provide You with services available through the Website and to enable + You to use some of its features. They help to authenticate users and prevent fraudulent use of user + accounts. Without these Cookies, the services that You have asked for cannot be provided, and We only use + these Cookies to provide You with those services.

    +
  • +
  • +

    Cookies Policy / Notice Acceptance Cookies

    +

    Type: Persistent Cookies

    +

    Administered by: Us

    +

    Purpose: These Cookies identify if users have accepted the use of cookies on the Website.

    +
  • +
  • +

    Functionality Cookies

    +

    Type: Persistent Cookies

    +

    Administered by: Us

    +

    Purpose: These Cookies allow us to remember choices You make when You use the Website, such as remembering + your login details or language preference. The purpose of these Cookies is to provide You with a more + personal experience and to avoid You having to re-enter your preferences every time You use the Website.

    +
  • +
+

For more information about the cookies we use and your choices regarding cookies, please visit our Cookies Policy or + the Cookies section of our Privacy Policy.

+

Use of Your Personal Data

+

The Company may use Personal Data for the following purposes:

+
    +
  • +

    To provide and maintain our Service, including to monitor the usage of our Service.

    +
  • +
  • +

    To manage Your Account: to manage Your registration as a user of the Service. The Personal + Data You provide can give You access to different functionalities of the Service that are available to You + as a registered user.

    +
  • +
  • +

    For the performance of a contract: the development, compliance and undertaking of the + purchase contract for the products, items or services You have purchased or of any other contract with Us + through the Service.

    +
  • +
  • +

    To contact You: To contact You by email, telephone calls, SMS, or other equivalent forms of + electronic communication, such as a mobile application's push notifications regarding updates or informative + communications related to the functionalities, products or contracted services, including the security + updates, when necessary or reasonable for their implementation.

    +
  • +
  • +

    To provide You with news, special offers and general information about other goods, services + and events which we offer that are similar to those that you have already purchased or enquired about unless + You have opted not to receive such information.

    +
  • +
  • +

    To manage Your requests: To attend and manage Your requests to Us.

    +
  • +
  • +

    For business transfers: We may use Your information to evaluate or conduct a merger, + divestiture, restructuring, reorganization, dissolution, or other sale or transfer of some or all of Our + assets, whether as a going concern or as part of bankruptcy, liquidation, or similar proceeding, in which + Personal Data held by Us about our Service users is among the assets transferred.

    +
  • +
  • +

    For other purposes: We may use Your information for other purposes, such as data analysis, + identifying usage trends, determining the effectiveness of our promotional campaigns and to evaluate and + improve our Service, products, services, marketing and your experience.

    +
  • +
+

We may share Your personal information in the following situations:

+
    +
  • With Service Providers: We may share Your personal information with Service Providers to + monitor and analyze the use of our Service, to contact You.
  • +
  • For business transfers: We may share or transfer Your personal information in connection with, + or during negotiations of, any merger, sale of Company assets, financing, or acquisition of all or a portion of + Our business to another company.
  • +
  • With Affiliates: We may share Your information with Our affiliates, in which case we will + require those affiliates to honor this Privacy Policy. Affiliates include Our parent company and any other + subsidiaries, joint venture partners or other companies that We control or that are under common control with + Us.
  • +
  • With business partners: We may share Your information with Our business partners to offer You + certain products, services or promotions.
  • +
  • With other users: when You share personal information or otherwise interact in the public areas + with other users, such information may be viewed by all users and may be publicly distributed outside.
  • +
  • With Your consent: We may disclose Your personal information for any other purpose with Your + consent.
  • +
+

Retention of Your Personal Data

+

The Company will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy + Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for + example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our + legal agreements and policies.

+

The Company will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a + shorter period of time, except when this data is used to strengthen the security or to improve the functionality of + Our Service, or We are legally obligated to retain this data for longer time periods.

+

Transfer of Your Personal Data

+

Your information, including Personal Data, is processed at the Company's operating offices and in any other places + where the parties involved in the processing are located. It means that this information may be transferred to ā€” and + maintained on ā€” computers located outside of Your state, province, country or other governmental jurisdiction where + the data protection laws may differ than those from Your jurisdiction.

+

Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that + transfer.

+

The Company will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance + with this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country + unless there are adequate controls in place including the security of Your data and other personal information.

+

Delete Your Personal Data

+

You have the right to delete or request that We assist in deleting the Personal Data that We have collected about + You.

+

Our Service may give You the ability to delete certain information about You from within the Service.

+

You may update, amend, or delete Your information at any time by signing in to Your Account, if you have one, and + visiting the account settings section that allows you to manage Your personal information. You may also contact Us + to request access to, correct, or delete any personal information that You have provided to Us.

+

Please note, however, that We may need to retain certain information when we have a legal obligation or lawful basis + to do so.

+

Disclosure of Your Personal Data

+

Business Transactions

+

If the Company is involved in a merger, acquisition or asset sale, Your Personal Data may be transferred. We will + provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy.

+

Law enforcement

+

Under certain circumstances, the Company may be required to disclose Your Personal Data if required to do so by law + or in response to valid requests by public authorities (e.g. a court or a government agency).

+

Other legal requirements

+

The Company may disclose Your Personal Data in the good faith belief that such action is necessary to:

+
    +
  • Comply with a legal obligation
  • +
  • Protect and defend the rights or property of the Company
  • +
  • Prevent or investigate possible wrongdoing in connection with the Service
  • +
  • Protect the personal safety of Users of the Service or the public
  • +
  • Protect against legal liability
  • +
+

Security of Your Personal Data

+

The security of Your Personal Data is important to Us, but remember that no method of transmission over the Internet, + or method of electronic storage is 100% secure. While We strive to use commercially acceptable means to protect Your + Personal Data, We cannot guarantee its absolute security.

+

Children's Privacy

+

Our Service does not address anyone under the age of 13. We do not knowingly collect personally identifiable + information from anyone under the age of 13. If You are a parent or guardian and You are aware that Your child has + provided Us with Personal Data, please contact Us. If We become aware that We have collected Personal Data from + anyone under the age of 13 without verification of parental consent, We take steps to remove that information from + Our servers.

+

If We need to rely on consent as a legal basis for processing Your information and Your country requires consent from + a parent, We may require Your parent's consent before We collect and use that information.

+

Links to Other Websites

+

Our Service may contain links to other websites that are not operated by Us. If You click on a third party link, You + will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site You + visit.

+

We have no control over and assume no responsibility for the content, privacy policies or practices of any third + party sites or services.

+

Changes to this Privacy Policy

+

We may update Our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy + Policy on this page.

+

We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and + update the "Last updated" date at the top of this Privacy Policy.

+

You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are + effective when they are posted on this page.

+

Contact Us

+

If you have any questions about this Privacy Policy, You can contact us:

diff --git a/themes/default/views/information/privacy.blade.php b/themes/default/views/information/privacy.blade.php new file mode 100644 index 000000000..081b186ff --- /dev/null +++ b/themes/default/views/information/privacy.blade.php @@ -0,0 +1,21 @@ +@extends('layouts.app') + +@section('content') + + +
+
+
+
+
+
+
+
{{ __('Privacy Policy') }}
+
+ @include('information.privacy-content') +
+
+
+
+ +@endsection diff --git a/themes/default/views/information/tos-content.blade.php b/themes/default/views/information/tos-content.blade.php new file mode 100644 index 000000000..6dd7c1293 --- /dev/null +++ b/themes/default/views/information/tos-content.blade.php @@ -0,0 +1,484 @@ + + +

+ +

+ +

Last updatedJanuary 02, 2023

+ +

+ +

+ +

+ +

TABLE OF CONTENTS

+ +

+ +
    +
  1. AGREEMENT TO TERMS
  2. +
  3. NTELLECTUAL PROPERTY RIGHTS
  4. +
  5. USER REPRESENTATIONS
  6. +
  7. USER REGISTRATION
  8. +
  9. PRODUCTS
  10. +
  11. PURCHASES AND PAYMENT
  12. +
  13. REFUNDSPOLICY
  14. +
  15. PROHIBITED ACTIVITIES
  16. +
  17. USER GENERATED CONTRIBUTIONS
  18. +
  19. CONTRIBUTION LICENSE
  20. +
  21. SOCIAL MEDIA
  22. +
  23. SUBMISSIONS
  24. +
  25. SITE MANAGEMENT
  26. +
  27. PRIVACY POLICY
  28. +
  29. TERM AND TERMINATION
  30. +
  31. MODIFICATIONS AND INTERRUPTIONS
  32. +
  33. GOVERNING LAW
  34. +
  35. DISPUTE RESOLUTION
  36. +
  37. >CORRECTIONS
  38. +
  39. DISCLAIMER
  40. +
  41. LIMITATIONS OF LIABILITY
  42. +
  43. INDEMNIFICATION
  44. +
  45. USER DATA
  46. +
  47. ELECTRONIC COMMUNICATIONS, TRANSACTIONS, AND SIGNATURES
  48. +
  49. CALIFORNIA USERS AND RESIDENTS
  50. +
  51. MISCELLANEOUS
  52. +
  53. CONTACT US
  54. +
+ +

+ +

+ +
    +
  1. AGREEMENT TO TERMS
  2. +
+ +

+ +

These Terms of Use constitute a legally binding agreement made between you, whether personally or on behalf of an entity (“you”) andMY Company("Company", “we”, “us”, or “our”), concerning your access to and use of theexample.comwebsite as well as any other media form, media channel, mobile website or mobile application related, linked, or otherwise connected thereto (collectively, the “Site”).Our VAT number is12345678.You agree that by accessing the Site, you have read, understood, and agreed to be bound by all of these Terms of Use. IF YOU DO NOT AGREE WITH ALL OF THESE TERMS OF USE, THEN YOU ARE EXPRESSLY PROHIBITED FROM USING THE SITE AND YOU MUST DISCONTINUE USE IMMEDIATELY.

+ +

+ +

Supplemental terms and conditions or documents that may be posted on the Site from time to time are hereby expressly incorporated herein by reference. We reserve the right, in our sole discretion, to make changes or modifications to these Terms of Usefrom time to time. We will alert you about any changes by updating the “Last updated” date of these Terms of Use, and you waive any right to receive specific notice of each such change. Please ensure that you check the applicable Terms every time you use our Site so that you understand which Terms apply. You will be subject to, and will be deemed to have been made aware of and to have accepted, the changes in any revised Terms of Use by your continued use of the Site after the date such revised Terms of Use are posted.

+ +

+ +

The information provided on the Site is not intended for distribution to or use by any person or entity in any jurisdiction or country where such distribution or use would be contrary to law or regulation or which would subject us to any registration requirement within such jurisdiction or country. Accordingly, those persons who choose to access the Site from other locations do so on their own initiative and are solely responsible for compliance with local laws, if and to the extent local laws are applicable.

+ +

+ +

TheSite is not tailored to comply with industry-specific regulations (Health Insurance Portability and Accountability Act (HIPAA), Federal Information Security Management Act (FISMA), etc.), so if your interactions would be subjected to such laws, you may not use this Site. You may not use the Site in a way that would violate the Gramm-Leach-Bliley Act (GLBA).

+ +

+ +

The Site is intended for users who are at least 13 years of age. All users who are minors in the jurisdiction in which they reside (generally under the age of 18) must have the permission of, and be directly supervised by, their parent or guardian to use the Site. If you are a minor, you must have your parent or guardian read and agree to these Terms of Use prior to you using the Site.

+ +

+ +

+ +
    +
  1. INTELLECTUAL PROPERTY RIGHTS
  2. +
+ +

+ +

Unless otherwise indicated, the Site is our proprietary property and all source code, databases, functionality, software, website designs, audio, video, text, photographs, and graphics on the Site (collectively, the “Content”) and the trademarks, service marks, and logos contained therein (the “Marks”) are owned or controlled by us or licensed to us, and are protected by copyright and trademark laws and various other intellectual property rights and unfair competition laws of the United States, international copyright laws, and international conventions. The Content and the Marks are provided on the Site “AS IS” for your information and personal use only. Except as expressly provided in these Terms of Use, no part of the Site and no Content or Marks may be copied, reproduced, aggregated, republished, uploaded, posted, publicly displayed, encoded, translated, transmitted, distributed, sold, licensed, or otherwise exploited for any commercial purpose whatsoever, without our express prior written permission.

+ +

+ +

Provided that you are eligible to use the Site, you are granted a limited license to access and use the Site and to download or print a copy of any portion of the Content to which you have properly gained access solely for your personal, non-commercial use. We reserve all rights not expressly granted to you in and to the Site, the Content and the Marks.

+ +

+ +

+ +
    +
  1. USER REPRESENTATIONS
  2. +
+ +

+ +

By using the Site, you represent and warrant that:(1) all registration information you submit will be true, accurate, current, and complete; (2) you will maintain the accuracy of such information and promptly update such registration information as necessary;(3) you have the legal capacity and you agree to comply with these Terms of Use;(4) you are not under the age of 13;(5) you are not a minor in the jurisdiction in which you reside, or if a minor, you have received parental permission to use the Site; (6) you will not access the Site through automated or non-human means, whether through a bot, script or otherwise; (7) you will not use the Site for any illegal or unauthorized purpose; and (8) your use of the Site will not violate any applicable law or regulation.

+ +

+ +

If you provide any information that is untrue, inaccurate, not current, or incomplete, we have the right to suspend or terminate your account and refuse any and all current or future use of the Site (or any portion thereof).

+ +

+ +

+ +
    +
  1. USER REGISTRATION
  2. +
+ +

+ +

You may be required to register with the Site. You agree to keep your password confidential and will be responsible for all use of your account and password. We reserve the right to remove, reclaim, or change a username you select if we determine, in our sole discretion, that such username is inappropriate, obscene, or otherwise objectionable.

+ +

+ +

+ +
    +
  1. PRODUCTS
  2. +
+ +

+ +

All products are subject to availability. We reserve the right to discontinue any products at any time for any reason. Prices for all products are subject to change.

+ +

+ +

+ +
    +
  1. PURCHASES AND PAYMENT
  2. +
+ +

+ +

We accept the following forms of payment:

+ +

+ +

- PayPal

+ +

+ +

You agree to provide current, complete, and accurate purchase and account information for all purchases made via the Site. You further agree to promptly update account and payment information, including email address, payment method, and payment card expiration date, so that we can complete your transactions and contact you as needed. Sales tax will be added to the price of purchases as deemed required by us. We may change prices at any time. All payments shall beinU.S. dollars.

+ +

+ +

You agree to pay all charges at the prices then in effect for your purchases and any applicable shipping fees, and you authorize us to charge your chosen payment provider for any such amounts upon placing your order.We reserve the right to correct any errors or mistakes in pricing, even if we have already requested or received payment.

+ +

+ +

We reserve the right to refuse any order placed through the Site. We may, in our sole discretion, limit or cancel quantities purchased per person, per household, or per order. These restrictions may include orders placed by or under the same customer account, the same payment method, and/or orders that use the same billing or shipping address. We reserve the right to limit or prohibit orders that, in our sole judgment, appear to be placed by dealers, resellers, or distributors.

+ +

+ +

+ +
    +
  1. REFUNDSPOLICY
  2. +
+ +

+ +

All sales are final and no refund will be issued.

+ +

+ +

+ +
    +
  1. PROHIBITED ACTIVITIES
  2. +
+ +

+ +

You may not access or use the Site for any purpose other than that for which we make the Site available. The Site may not be used in connection with any commercial endeavors except those that are specifically endorsed or approved by us.

+ +

+ +

As a user of the Site, you agree not to:

+ +
    +
  • Systematically retrieve data or other content from the Site to create or compile, directly or indirectly, a collection, compilation, database, or directory without written permission from us.
  • +
  • Trick, defraud, or mislead us and other users, especially in any attempt to learn sensitive account information such as user passwords.
  • +
  • Circumvent, disable, or otherwise interfere with security-related features of the Site, including features that prevent or restrict the use or copying of any Content or enforce limitations on the use of the Site and/or the Content contained therein.
  • +
  • Disparage, tarnish, or otherwise harm, in our opinion, us and/or the Site.
  • +
  • Use any information obtained from the Site in order to harass, abuse, or harm another person.
  • +
  • Make improper use of our support services or submit false reports of abuse or misconduct.
  • +
  • Use the Site in a manner inconsistent with any applicable laws or regulations.
  • +
  • Engage in unauthorized framing of or linking to the Site.
  • +
  • Upload or transmit (or attempt to upload or to transmit) viruses, Trojan horses, or other material, including excessive use of capital letters and spamming (continuous posting of repetitive text), that interferes with any party’s uninterrupted use and enjoyment of the Site or modifies, impairs, disrupts, alters, or interferes with the use, features, functions, operation, or maintenance of the Site.
  • +
  • Engage in any automated use of the system, such as using scripts to send comments or messages, or using any data mining, robots, or similar data gathering and extraction tools.
  • +
  • Delete the copyright or other proprietary rights notice from any Content.
  • +
  • Attempt to impersonate another user or person or use the username of another user.
  • +
  • Upload or transmit (or attempt to upload or to transmit) any material that acts as a passive or active information collection or transmission mechanism, including without limitation, clear graphics interchange formats (“gifs”), 1×1 pixels, web bugs, cookies, or other similar devices (sometimes referred to as “spyware” or “passive collection mechanisms” or “pcms”).
  • +
  • Interfere with, disrupt, or create an undue burden on the Site or the networks or services connected to the Site.
  • +
  • Harass, annoy, intimidate, or threaten any of our employees or agents engaged in providing any portion of the Site to you.
  • +
  • Attempt to bypass any measures of the Site designed to prevent or restrict access to the Site, or any portion of the Site.
  • +
  • Copy or adapt the Site’s software, including but not limited to Flash, PHP, HTML, JavaScript, or other code.
  • +
  • Except as permitted by applicable law, decipher, decompile, disassemble, or reverse engineer any of the software comprising or in any way making up a part of the Site.
  • +
  • Except as may be the result of standard search engine or Internet browser usage, use, launch, develop, or distribute any automated system, including without limitation, any spider, robot, cheat utility, scraper, or offline reader that accesses the Site, or using or launching any unauthorized script or other software.
  • +
  • Use a buying agent or purchasing agent to make purchases on the Site.
  • +
  • Make any unauthorized use of the Site, including collecting usernames and/or email addresses of users by electronic or other means for the purpose of sending unsolicited email, or creating user accounts by automated means or under false pretenses.
  • +
  • Use the Site as part of any effort to compete with us or otherwise use the Site and/or the Content for any revenue-generating endeavor or commercial enterprise.
  • +
+ +

+ +

+ +
    +
  1. USER GENERATED CONTRIBUTIONS
  2. +
+ +

+ +

The Site does not offer users to submit or post content. We may provide you with the opportunity to create, submit, post, display, transmit, perform, publish, distribute, or broadcast content and materials to us or on the Site, including but not limited to text, writings, video, audio, photographs, graphics, comments, suggestions, or personal information or other material (collectively, "Contributions"). Contributions may be viewable by other users of the Site and through third-party websites. As such, any Contributions you transmit may be treated in accordance with the Site Privacy Policy. When you create or make available any Contributions, you thereby represent and warrant that:

+ +
    +
  • The creation, distribution, transmission, public display, or performance, and the accessing, downloading, or copying of your Contributions do not and will not infringe the proprietary rights, including but not limited to the copyright, patent, trademark, trade secret, or moral rights of any third party.
  • +
  • You are the creator and owner of or have the necessary licenses, rights, consents, releases, and permissions to use and to authorize us, the Site, and other users of the Site to use your Contributions in any manner contemplated by the Site and these Terms of Use.
  • +
  • You have the written consent, release, and/or permission of each and every identifiable individual person in your Contributions to use the name or likeness of each and every such identifiable individual person to enable inclusion and use of your Contributions in any manner contemplated by the Site and these Terms of Use.
  • +
  • Your Contributions are not false, inaccurate, or misleading.
  • +
  • Your Contributions are not unsolicited or unauthorized advertising, promotional materials, pyramid schemes, chain letters, spam, mass mailings, or other forms of solicitation.
  • +
  • Your Contributions are not obscene, lewd, lascivious, filthy, violent, harassing, libelous, slanderous, or otherwise objectionable (as determined by us).
  • +
  • Your Contributions do not ridicule, mock, disparage, intimidate, or abuse anyone.
  • +
  • Your Contributions are not used to harass or threaten (in the legal sense of those terms) any other person and to promote violence against a specific person or class of people.
  • +
  • Your Contributions do not violate any applicable law, regulation, or rule.
  • +
  • Your Contributions do not violate the privacy or publicity rights of any third party.
  • +
  • Your Contributions do not violate any applicable law concerning child pornography, or otherwise intended to protect the health or well-being of minors;
  • +
  • Your Contributions do not include any offensive comments that are connected to race, national origin, gender, sexual preference, or physical handicap.
  • +
  • Your Contributions do not otherwise violate, or link to material that violates, any provision of these Terms of Use, or any applicable law or regulation.
  • +
+ +

Any use of the Site or the Marketplace Offerings in violation of the foregoing violates these Terms of Use and may result in, among other things, termination or suspension of your rights to use the Site and the Marketplace Offerings.

+ +

+ +

+ +
    +
  1. CONTRIBUTION LICENSE
  2. +
+ +

+ +

You and Site agree that we may access, store, process, and use any information and personal data that you provide following the terms of the Privacy Policy and your choices (including settings).

+ +

+ +

By submitting suggestions or other feedback regarding the Site, you agree that we can use and share such feedback for any purpose without compensation to you.

+ +

+ +

We do not assert any ownership over your Contributions. You retain full ownership of all of your Contributions and any intellectual property rights or other proprietary rights associated with your Contributions. We are not liable for any statements or representations in your Contributions provided by you in any area on the Site. You are solely responsible for your Contributions to the Site and you expressly agree to exonerate us from any and all responsibility and to refrain from any legal action against us regarding your Contributions.

+ +

+ +

+ +
    +
  1. SOCIAL MEDIA
  2. +
+ +

+ +

As part of the functionality of the Site, you may link your account with online accounts you have with third-party service providers (each such account, a “Third-Party Account”) by either: (1) providing your Third-Party Account login information through the Site; or (2) allowing us to access yourThird-PartyAccount, as is permitted under the applicable terms and conditions that govern your use of eachThird-PartyAccount. You represent and warrant that you are entitled to disclose yourThird-PartyAccount login information to us and/or grant us access to yourThird-PartyAccount, without breach by you of any of the terms and conditions that govern your use of the applicableThird-PartyAccount, and without obligating us to pay any fees or making us subject to any usage limitations imposed by the third-party service provider of theThird-PartyAccount. By granting us access to anyThird-PartyAccounts, you understand that (1) we may access, make available, and store (if applicable) any content that you have provided to and stored in yourThird-PartyAccount (the “Social Network Content”) so that it is available on and through the Site via your account, including without limitation any friend lists and (2) we may submit to and receive from yourThird-PartyAccount additional information to the extent you are notified when you link your account with theThird-PartyAccount. Depending on theThird-PartyAccounts you choose and subject to the privacy settings that you have set in suchThird-PartyAccounts, personally identifiable information that you post to yourThird-PartyAccounts may be available on and through your account on the Site. Please note that if aThird-PartyAccount or associated service becomes unavailable or our access to suchThird-PartyAccount is terminated by the third-party service provider, then Social Network Content may no longer be available on and through the Site. You will have the ability to disable the connection between your account on the Site and yourThird-PartyAccounts at any time. PLEASE NOTE THAT YOUR RELATIONSHIP WITH THE THIRD-PARTY SERVICE PROVIDERS ASSOCIATED WITH YOUR THIRD-PARTY ACCOUNTS IS GOVERNED SOLELY BY YOUR AGREEMENT(S) WITH SUCH THIRD-PARTY SERVICE PROVIDERS. We make no effort to review any Social Network Content for any purpose, including but not limited to, for accuracy, legality, or non-infringement, and we are not responsible for any Social Network Content. You acknowledge and agree that we may access your email address book associated with aThird-PartyAccount and your contacts list stored on your mobile device or tablet computer solely for purposes of identifying and informing you of those contacts who have also registered to use the Site. You can deactivate the connection between the Site and yourThird-PartyAccount by contacting us using the contact information below or through your account settings (if applicable). We will attempt to delete any information stored on our servers that was obtained through suchThird-PartyAccount, except the username and profile picture that become associated with your account.

+ +

+ +

+ +
    +
  1. SUBMISSIONS
  2. +
+ +

+ +

You acknowledge and agree that any questions, comments, suggestions, ideas, feedback, or other information regarding the Site or the Marketplace Offerings ("Submissions") provided by you to us are non-confidential and shall become our sole property. We shall own exclusive rights, including all intellectual property rights, and shall be entitled to the unrestricted use and dissemination of these Submissions for any lawful purpose, commercial or otherwise, without acknowledgment or compensation to you. You hereby waive all moral rights to any such Submissions, and you hereby warrant that any such Submissions are original with you or that you have the right to submit such Submissions. You agree there shall be no recourse against us for any alleged or actual infringement or misappropriation of any proprietary right in your Submissions.

+ +

+ +

+ +
    +
  1. SITE MANAGEMENT
  2. +
+ +

+ +

We reserve the right, but not the obligation, to: (1) monitor the Site for violations of these Terms of Use; (2) take appropriate legal action against anyone who, in our sole discretion, violates the law or these Terms of Use, including without limitation, reporting such user to law enforcement authorities; (3) in our sole discretion and without limitation, refuse, restrict access to, limit the availability of, or disable (to the extent technologically feasible) any of your Contributions or any portion thereof; (4) in our sole discretion and without limitation, notice, or liability, to remove from the Site or otherwise disable all files and content that are excessive in size or are in any way burdensome to our systems; and (5) otherwise manage the Site in a manner designed to protect our rights and property and to facilitate the proper functioning of the Site and the Marketplace Offerings.

+ +

+ +

+ +

+ +

We care about data privacy and security. Please review our Privacy Policy:/privacy. By using the Site or the Marketplace Offerings, you agree to be bound by our Privacy Policy, which is incorporated into these Terms of Use. Please be advised the Site and the Marketplace Offerings are hosted inGermany. If you access the Site or the Marketplace Offerings from any other region of the world with laws or other requirements governing personal data collection, use, or disclosure that differ from applicable laws inGermany, then through your continued use of the Site, you are transferring your data toGermany, and you expressly consent to have your data transferred to and processed inGermany.Further, we do not knowingly accept, request, or solicit information from children or knowingly market to children. Therefore, in accordance with the U.S. Children’s Online Privacy Protection Act, if we receive actual knowledge that anyone under the age of 13 has provided personal information to us without the requisite and verifiable parental consent, we will delete that information from the Site as quickly as is reasonably practical.

+ +

+ +

+ +
    +
  1. TERM AND TERMINATION
  2. +
+ +

+ +

These Terms of Use shall remain in full force and effect while you use the Site. WITHOUT LIMITING ANY OTHER PROVISION OF THESE TERMS OF USE, WE RESERVE THE RIGHT TO, IN OUR SOLE DISCRETION AND WITHOUT NOTICE OR LIABILITY, DENY ACCESS TO AND USE OF THE SITE AND THE MARKETPLACE OFFERINGS (INCLUDING BLOCKING CERTAIN IP ADDRESSES), TO ANY PERSON FOR ANY REASON OR FOR NO REASON, INCLUDING WITHOUT LIMITATION FOR BREACH OF ANY REPRESENTATION, WARRANTY, OR COVENANT CONTAINED IN THESE TERMS OF USE OR OF ANY APPLICABLE LAW OR REGULATION. WE MAY TERMINATE YOUR USE OR PARTICIPATION IN THE SITE AND THE MARKETPLACE OFFERINGS OR DELETEYOUR ACCOUNT ANDANY CONTENT OR INFORMATION THAT YOU POSTED AT ANY TIME, WITHOUT WARNING, IN OUR SOLE DISCRETION.

+ +

+ +

If we terminate or suspend your account for any reason, you are prohibited from registering and creating a new account under your name, a fake or borrowed name, or the name of any third party, even if you may be acting on behalf of the third party. In addition to terminating or suspending your account, we reserve the right to take appropriate legal action, including without limitation pursuing civil, criminal, and injunctive redress.

+ +

+ +

+ +
    +
  1. MODIFICATIONS AND INTERRUPTIONS
  2. +
+ +

+ +

We reserve the right to change, modify, or remove the contents of the Site at any time or for any reason at our sole discretion without notice. However, we have no obligation to update any information on our Site. We also reserve the right to modify or discontinue all or part of the Marketplace Offerings without notice at any time. We will not be liable to you or any third party for any modification, price change, suspension, or discontinuance of the Site or the Marketplace Offerings.

+ +

+ +

We cannot guarantee the Site and the Marketplace Offerings will be available at all times. We may experience hardware, software, or other problems or need to perform maintenance related to the Site, resulting in interruptions, delays, or errors. We reserve the right to change, revise, update, suspend, discontinue, or otherwise modify the Site or the Marketplace Offerings at any time or for any reason without notice to you. You agree that we have no liability whatsoever for any loss, damage, or inconvenience caused by your inability to access or use the Site or the Marketplace Offerings during any downtime or discontinuance of the Site or the Marketplace Offerings. Nothing in these Terms of Use will be construed to obligate us to maintain and support the Site or the Marketplace Offerings or to supply any corrections, updates, or releases in connection therewith.

+ +

+ +

+ +
    +
  1. GOVERNING LAW
  2. +
+ +

+ +

These conditions are governed by and interpreted following the laws ofGermany, and the use of the United Nations Convention of Contracts for the International Sales of Goods is expressly excluded. If your habitual residence is in the EU, and you are a consumer, you additionally possess the protection provided to you by obligatory provisions of the law in your country to residence.MY Companyand yourself both agree to submit to the non-exclusive jurisdiction of the courts ofBerlin, which means that you may make a claim to defend your consumer protection rights in regards to these Conditions of Use inGermany, or in the EU country in which you reside.

+ +

+ +

+ +
    +
  1. DISPUTE RESOLUTION
  2. +
+ +

+ +

The European Commission provides an online dispute resolution platform, which you can access here:https://ec.europa.eu/consumers/odr. If you would like to bring this subject to our attention, please contact us.

+ +

+ +

+ +
    +
  1. CORRECTIONS
  2. +
+ +

+ +

There may be information on the Site that contains typographical errors, inaccuracies, or omissions that may relate to the Marketplace Offerings, including descriptions, pricing, availability, and various other information. We reserve the right to correct any errors, inaccuracies, or omissions and to change or update the information on the Site at any time, without prior notice.

+ +

+ +

+ +
    +
  1. DISCLAIMER
  2. +
+ +

+ +

THE SITE IS PROVIDED ON AN AS-IS AND AS-AVAILABLE BASIS. YOU AGREE THAT YOUR USE OF THE SITE SERVICES WILL BE AT YOUR SOLE RISK. TO THE FULLEST EXTENT PERMITTED BY LAW, WE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, IN CONNECTION WITH THE SITE AND YOUR USE THEREOF, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. WE MAKE NO WARRANTIES OR REPRESENTATIONS ABOUT THE ACCURACY OR COMPLETENESS OF THE SITE’S CONTENT OR THE CONTENT OF ANY WEBSITES LINKED TO THIS SITE AND WE WILL ASSUME NO LIABILITY OR RESPONSIBILITY FOR ANY (1) ERRORS, MISTAKES, OR INACCURACIES OF CONTENT AND MATERIALS, (2) PERSONAL INJURY OR PROPERTY DAMAGE, OF ANY NATURE WHATSOEVER, RESULTING FROM YOUR ACCESS TO AND USE OF THE SITE, (3) ANY UNAUTHORIZED ACCESS TO OR USE OF OUR SECURE SERVERS AND/OR ANY AND ALL PERSONAL INFORMATION AND/OR FINANCIAL INFORMATION STORED THEREIN, (4) ANY INTERRUPTION OR CESSATION OF TRANSMISSION TO OR FROM THE SITE, (5) ANY BUGS, VIRUSES, TROJAN HORSES, OR THE LIKE WHICH MAY BE TRANSMITTED TO OR THROUGH THE SITE BY ANY THIRD PARTY, AND/OR (6) ANY ERRORS OR OMISSIONS IN ANY CONTENT AND MATERIALS OR FOR ANY LOSS OR DAMAGE OF ANY KIND INCURRED AS A RESULT OF THE USE OF ANY CONTENT POSTED, TRANSMITTED, OR OTHERWISE MADE AVAILABLE VIA THE SITE. WE DO NOT WARRANT, ENDORSE, GUARANTEE, OR ASSUME RESPONSIBILITY FOR ANY PRODUCT OR SERVICE ADVERTISED OR OFFERED BY A THIRD PARTY THROUGH THE SITE, ANY HYPERLINKED WEBSITE, OR ANY WEBSITE OR MOBILE APPLICATION FEATURED IN ANY BANNER OR OTHER ADVERTISING, AND WE WILL NOT BE A PARTY TO OR IN ANY WAY BE RESPONSIBLE FOR MONITORING ANY TRANSACTION BETWEEN YOU AND ANY THIRD-PARTY PROVIDERS OF PRODUCTS OR SERVICES. AS WITH THE PURCHASE OF A PRODUCT OR SERVICE THROUGH ANY MEDIUM OR IN ANY ENVIRONMENT, YOU SHOULD USE YOUR BEST JUDGMENT AND EXERCISE CAUTION WHERE APPROPRIATE.

+ +

+ +

+ +
    +
  1. LIMITATIONS OF LIABILITY
  2. +
+ +

+ +

IN NO EVENT WILL WE OR OUR DIRECTORS, EMPLOYEES, OR AGENTS BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, SPECIAL, OR PUNITIVE DAMAGES, INCLUDING LOST PROFIT, LOST REVENUE, LOSS OF DATA, OR OTHER DAMAGES ARISING FROM YOUR USE OF THE SITE, EVEN IF WE HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

+ +

+ +

+ +
    +
  1. INDEMNIFICATION
  2. +
+ +

+ +

You agree to defend, indemnify, and hold us harmless, including our subsidiaries, affiliates, and all of our respective officers, agents, partners, and employees, from and against any loss, damage, liability, claim, or demand, including reasonable attorneys’ fees and expenses, made by any third party due to or arising out of:(1) use of the Site; (2) breach of these Terms of Use; (3) any breach of your representations and warranties set forth in these Terms of Use; (4) your violation of the rights of a third party, including but not limited to intellectual property rights; or (5) any overt harmful act toward any other user of the Site with whom you connected via the Site. Notwithstanding the foregoing, we reserve the right, at your expense, to assume the exclusive defense and control of any matter for which you are required to indemnify us, and you agree to cooperate, at your expense, with our defense of such claims. We will use reasonable efforts to notify you of any such claim, action, or proceeding which is subject to this indemnification upon becoming aware of it.

+ +

+ +

+ +
    +
  1. USER DATA
  2. +
+ +

+ +

We will maintain certain data that you transmit to the Site for the purpose of managing the performance of the Site, as well as data relating to your use of the Site. Although we perform regular routine backups of data, you are solely responsible for all data that you transmit or that relates to any activity you have undertaken using the Site. You agree that we shall have no liability to you for any loss or corruption of any such data, and you hereby waive any right of action against us arising from any such loss or corruption of such data.

+ +

+ +

+ +
    +
  1. ELECTRONIC COMMUNICATIONS, TRANSACTIONS, AND SIGNATURES
  2. +
+ +

+ +

Visiting the Site, sending us emails, and completing online forms constitute electronic communications. You consent to receive electronic communications, and you agree that all agreements, notices, disclosures, and other communications we provide to you electronically, via email and on the Site, satisfy any legal requirement that such communication be in writing. YOU HEREBY AGREE TO THE USE OF ELECTRONIC SIGNATURES, CONTRACTS, ORDERS, AND OTHER RECORDS, AND TO ELECTRONIC DELIVERY OF NOTICES, POLICIES, AND RECORDS OF TRANSACTIONS INITIATED OR COMPLETED BY US OR VIA THE SITE. You hereby waive any rights or requirements under any statutes, regulations, rules, ordinances, or other laws in any jurisdiction which require an original signature or delivery or retention of non-electronic records, or to payments or the granting of credits by any means other than electronic means.

+ +

+ +

+ +
    +
  1. CALIFORNIA USERS AND RESIDENTS
  2. +
+ +

+ +

If any complaint with us is not satisfactorily resolved, you can contact the Complaint Assistance Unit of the Division of Consumer Services of the California Department of Consumer Affairs in writing at 1625 North Market Blvd., Suite N 112, Sacramento, California 95834 or by telephone at (800) 952-5210 or (916) 445-1254.

+ +

+ +

+ +
    +
  1. MISCELLANEOUS
  2. +
+ +

+ +

These Terms of Use and any policies or operating rules posted by us on the Site or in respect to the Site constitute the entire agreement and understanding between you and us. Our failure to exercise or enforce any right or provision of these Terms of Use shall not operate as a waiver of such right or provision. These Terms of Use operate to the fullest extent permissible by law. We may assign any or all of our rights and obligations to others at any time. We shall not be responsible or liable for any loss, damage, delay, or failure to act caused by any cause beyond our reasonable control. If any provision or part of a provision of these Terms of Use is determined to be unlawful, void, or unenforceable, that provision or part of the provision is deemed severable from these Terms of Use and does not affect the validity and enforceability of any remaining provisions. There is no joint venture, partnership, employment or agency relationship created between you and us as a result of these Terms of Use or use of the Site. You agree that these Terms of Use will not be construed against us by virtue of having drafted them. You hereby waive any and all defenses you may have based on the electronic form of these Terms of Use and the lack of signing by the parties hereto to execute these Terms of Use.

+ +

+ +

+ +
    +
  1. CONTACT US
  2. +
+ +

+ +

In order to resolve a complaint regarding the Site or to receive further information regarding use of the Site, please contact us at:

+ +

+ +

MY Company

+ +

Some Street

+ +

Some City,Some State12356

+ +

Germany

+ +

Phone:112345678

+ +

myemail@eamil.com

diff --git a/themes/default/views/information/tos.blade.php b/themes/default/views/information/tos.blade.php new file mode 100644 index 000000000..8e16680cb --- /dev/null +++ b/themes/default/views/information/tos.blade.php @@ -0,0 +1,21 @@ +@extends('layouts.app') + +@section('content') + + +
+
+
+
+
+
+
+
{{ __('Terms of Service') }}
+
+ @include('information.tos-content') +
+
+
+
+ +@endsection diff --git a/resources/views/layouts/app.blade.php b/themes/default/views/layouts/app.blade.php similarity index 61% rename from resources/views/layouts/app.blade.php rename to themes/default/views/layouts/app.blade.php index 4f3bae60a..72e987791 100644 --- a/resources/views/layouts/app.blade.php +++ b/themes/default/views/layouts/app.blade.php @@ -4,6 +4,9 @@ + + + exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image"> @@ -20,9 +23,11 @@ + + @@ -33,29 +38,30 @@ @yield('content') + diff --git a/resources/views/layouts/main.blade.php b/themes/default/views/layouts/main.blade.php similarity index 78% rename from resources/views/layouts/main.blade.php rename to themes/default/views/layouts/main.blade.php index ae31b5e1e..b708b198e 100644 --- a/resources/views/layouts/main.blade.php +++ b/themes/default/views/layouts/main.blade.php @@ -6,9 +6,12 @@ + + + exists('logo.png') ? asset('storage/logo.png') : asset('images/controlpanel_logo.png') }}' property="og:image"> {{ config('app.name', 'Laravel') }} @@ -19,6 +22,8 @@ {{-- summernote --}} + + {{-- datetimepicker --}} @@ -33,6 +38,8 @@ + + @@ -49,11 +56,11 @@ class="fas fa-bars"> {{ __('Home') }} - @if(config('SETTINGS::DISCORD:INVITE_URL')) - + @if (config('SETTINGS::DISCORD:INVITE_URL')) + @endif @if (config('SETTINGS::LOCALE:CLIENTS_CAN_CHANGE') == 'true') @@ -72,7 +79,6 @@ class="fab fa-discord mr-2">{{ __('Discord') }} - @endforeach @@ -98,8 +104,7 @@ class="badge badge-warning navbar-badge">{{ Auth::user()->unreadNotifications->c {{ __('Notifications') }} - @foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5) - as $notification) + @foreach (Auth::user()->unreadNotifications->sortBy('created_at')->take(5) as $notification) {{ $notification->data['title'] }} @@ -114,7 +119,7 @@ class="float-right text-muted text-sm">{{ $notification->created_at->longAbsolut class="dropdown-item dropdown-footer">{{ __('See all Notifications') }} {{ __('Mark all as read') }} + class="dropdown-item dropdown-footer">{{ __('Mark all as read') }}
@@ -141,8 +146,8 @@ class="dropdown-item dropdown-footer">{{ __('Mark all as read') }}
@@ -307,6 +312,34 @@ class="fab fa-discord mr-1">{{ __('Re-Sync Discord') }}