diff --git a/app/Http/Controllers/Admin/NestsController.php b/app/Http/Controllers/Admin/NestsController.php deleted file mode 100644 index 4ed765ea..00000000 --- a/app/Http/Controllers/Admin/NestsController.php +++ /dev/null @@ -1,151 +0,0 @@ -input('disabled')); - $nest->update(['disabled' => $disabled]); - - return redirect()->back()->with('success', 'Nest updated'); - - } - - /** - * Remove the specified resource from storage. - * - * @param Nest $nest - * @return Response - */ - public function destroy(Nest $nest) - { - // - } - - /** - * - * @throws Exception - */ - public function sync(){ - Egg::query()->delete(); - Nest::query()->delete(); - Nest::syncNests(); - Egg::syncEggs(); - - - return redirect()->back()->with('success', 'Nests and Eggs have been synced'); - } - - /** - * @param Request $request - * @return JsonResponse|mixed - * @throws Exception - */ - public function dataTable(Request $request) - { - $query = Nest::with(['eggs']); - $query->select('nests.*'); - - return datatables($query) - ->addColumn('eggs', function (Nest $nest) { - return $nest->eggs()->count(); - }) - ->addColumn('actions', function (Nest $nest) { - $checked = $nest->disabled == false ? "checked" : ""; - return ' -
- '; - }) - ->editColumn('created_at' , function (Nest $nest) { - return $nest->created_at ? $nest->created_at->diffForHumans() : ''; - }) - ->rawColumns(['actions']) - ->make(); - } -} diff --git a/app/Http/Controllers/Admin/NodeController.php b/app/Http/Controllers/Admin/NodeController.php deleted file mode 100644 index 932338f8..00000000 --- a/app/Http/Controllers/Admin/NodeController.php +++ /dev/null @@ -1,149 +0,0 @@ -input('disabled')); - $node->update(['disabled' => $disabled]); - - return redirect()->back()->with('success', 'Node updated'); - - } - - /** - * Remove the specified resource from storage. - * - * @param Node $node - * @return Response - */ - public function destroy(Node $node) - { - // - } - - /** - * - * @throws Exception - */ - public function sync(){ - Node::query()->delete(); - Location::query()->delete(); - Node::syncNodes(); - - return redirect()->back()->with('success', 'Locations and Nodes have been synced'); - } - - /** - * @param Request $request - * @return JsonResponse|mixed - * @throws Exception - */ - public function dataTable(Request $request) - { - $query = Node::with(['location']); - $query->select('nodes.*'); - - return datatables($query) - ->addColumn('location', function (Node $node) { - return $node->location->name; - }) - ->addColumn('actions', function (Node $node) { - $checked = $node->disabled == false ? "checked" : ""; - return ' - - '; - }) - ->editColumn('created_at' , function (Node $node) { - return $node->created_at ? $node->created_at->diffForHumans() : ''; - }) - ->rawColumns(['actions']) - ->make(); - } -} diff --git a/app/Http/Controllers/Admin/OverViewController.php b/app/Http/Controllers/Admin/OverViewController.php index 1fa022ec..29049b8f 100644 --- a/app/Http/Controllers/Admin/OverViewController.php +++ b/app/Http/Controllers/Admin/OverViewController.php @@ -23,7 +23,7 @@ class OverViewController extends Controller }); $creditCount = Cache::remember('credit:count', self::TTL, function () { - return User::query()->sum('credits'); + return User::query()->where("role","!=","admin")->sum('credits'); }); $paymentCount = Cache::remember('payment:count', self::TTL, function () { diff --git a/app/Http/Controllers/Admin/PaymentController.php b/app/Http/Controllers/Admin/PaymentController.php index 72d5e9d2..c7cf8a1e 100644 --- a/app/Http/Controllers/Admin/PaymentController.php +++ b/app/Http/Controllers/Admin/PaymentController.php @@ -6,7 +6,7 @@ use App\Events\UserUpdateCreditsEvent; use App\Http\Controllers\Controller; use App\Models\InvoiceSettings; use App\Models\Payment; -use App\Models\CreditProduct; +use App\Models\ShopProduct; use App\Models\Settings; use App\Models\User; use App\Notifications\InvoiceNotification; @@ -49,25 +49,25 @@ class PaymentController extends Controller /** * @param Request $request - * @param CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return Application|Factory|View */ - public function checkOut(Request $request, CreditProduct $creditProduct) + public function checkOut(Request $request, ShopProduct $shopProduct) { return view('store.checkout')->with([ - 'product' => $creditProduct, - 'taxvalue' => $creditProduct->getTaxValue(), - 'taxpercent' => $creditProduct->getTaxPercent(), - 'total' => $creditProduct->getTotalPrice() + 'product' => $shopProduct, + 'taxvalue' => $shopProduct->getTaxValue(), + 'taxpercent' => $shopProduct->getTaxPercent(), + 'total' => $shopProduct->getTotalPrice() ]); } /** * @param Request $request - * @param CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return RedirectResponse */ - public function PaypalPay(Request $request, CreditProduct $creditProduct) + public function PaypalPay(Request $request, ShopProduct $shopProduct) { $request = new OrdersCreateRequest(); $request->prefer('return=representation'); @@ -76,20 +76,20 @@ class PaymentController extends Controller "purchase_units" => [ [ "reference_id" => uniqid(), - "description" => $creditProduct->description, + "description" => $shopProduct->description, "amount" => [ - "value" => $creditProduct->getTotalPrice(), - 'currency_code' => strtoupper($creditProduct->currency_code), + "value" => $shopProduct->getTotalPrice(), + 'currency_code' => strtoupper($shopProduct->currency_code), 'breakdown' => [ 'item_total' => [ - 'currency_code' => strtoupper($creditProduct->currency_code), - 'value' => $creditProduct->price, + 'currency_code' => strtoupper($shopProduct->currency_code), + 'value' => $shopProduct->price, ], 'tax_total' => [ - 'currency_code' => strtoupper($creditProduct->currency_code), - 'value' => $creditProduct->getTaxValue(), + 'currency_code' => strtoupper($shopProduct->currency_code), + 'value' => $shopProduct->getTaxValue(), ] ] ] @@ -97,7 +97,7 @@ class PaymentController extends Controller ], "application_context" => [ "cancel_url" => route('payment.Cancel'), - "return_url" => route('payment.PaypalSuccess', ['product' => $creditProduct->id]), + "return_url" => route('payment.PaypalSuccess', ['product' => $shopProduct->id]), 'brand_name' => config('app.name', 'Laravel'), 'shipping_preference' => 'NO_SHIPPING' ] @@ -151,8 +151,8 @@ class PaymentController extends Controller */ public function PaypalSuccess(Request $laravelRequest) { - /** @var CreditProduct $creditProduct */ - $creditProduct = CreditProduct::findOrFail($laravelRequest->input('product')); + /** @var ShopProduct $shopProduct */ + $shopProduct = ShopProduct::findOrFail($laravelRequest->input('product')); /** @var User $user */ $user = Auth::user(); @@ -164,9 +164,6 @@ class PaymentController extends Controller $response = $this->getPayPalClient()->execute($request); if ($response->statusCode == 201 || $response->statusCode == 200) { - //update credits - $user->increment('credits', $creditProduct->quantity); - //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')) { @@ -174,6 +171,14 @@ class PaymentController extends Controller } } + //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 if ($user->role == 'member') { $user->update(['role' => 'client']); @@ -184,15 +189,15 @@ class PaymentController extends Controller 'user_id' => $user->id, 'payment_id' => $response->result->id, 'payment_method' => 'paypal', - 'type' => 'Credits', + 'type' => $shopProduct->type, 'status' => 'paid', - 'amount' => $creditProduct->quantity, - 'price' => $creditProduct->price, - 'tax_value' => $creditProduct->getTaxValue(), - 'tax_percent' => $creditProduct->getTaxPercent(), - 'total_price' => $creditProduct->getTotalPrice(), - 'currency_code' => $creditProduct->currency_code, - 'credit_product_id' => $creditProduct->id, + '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, ]); @@ -200,7 +205,7 @@ class PaymentController extends Controller //only create invoice if SETTINGS::INVOICE:ENABLED is true if (config('SETTINGS::INVOICE:ENABLED') == 'true') { - $this->createInvoice($user, $payment, 'paid', $creditProduct->currency_code); + $this->createInvoice($user, $payment, 'paid', $shopProduct->currency_code); } @@ -236,10 +241,10 @@ class PaymentController extends Controller /** * @param Request $request - * @param CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return RedirectResponse */ - public function StripePay(Request $request, CreditProduct $creditProduct) + public function StripePay(Request $request, ShopProduct $shopProduct) { $stripeClient = $this->getStripeClient(); @@ -248,23 +253,23 @@ class PaymentController extends Controller 'line_items' => [ [ 'price_data' => [ - 'currency' => $creditProduct->currency_code, + 'currency' => $shopProduct->currency_code, 'product_data' => [ - 'name' => $creditProduct->display, - 'description' => $creditProduct->description, + 'name' => $shopProduct->display, + 'description' => $shopProduct->description, ], - 'unit_amount_decimal' => round($creditProduct->price * 100, 2), + 'unit_amount_decimal' => round($shopProduct->price * 100, 2), ], 'quantity' => 1, ], [ 'price_data' => [ - 'currency' => $creditProduct->currency_code, + 'currency' => $shopProduct->currency_code, 'product_data' => [ 'name' => 'Product Tax', - 'description' => $creditProduct->getTaxPercent() . "%", + 'description' => $shopProduct->getTaxPercent() . "%", ], - 'unit_amount_decimal' => round($creditProduct->getTaxValue(), 2) * 100, + 'unit_amount_decimal' => round($shopProduct->getTaxValue(), 2) * 100, ], 'quantity' => 1, ] @@ -272,7 +277,7 @@ class PaymentController extends Controller 'mode' => 'payment', "payment_method_types" => str_getcsv(config("SETTINGS::PAYMENTS:STRIPE:METHODS")), - 'success_url' => route('payment.StripeSuccess', ['product' => $creditProduct->id]) . '&session_id={CHECKOUT_SESSION_ID}', + 'success_url' => route('payment.StripeSuccess', ['product' => $shopProduct->id]) . '&session_id={CHECKOUT_SESSION_ID}', 'cancel_url' => route('payment.Cancel'), ]); @@ -286,8 +291,8 @@ class PaymentController extends Controller */ public function StripeSuccess(Request $request) { - /** @var CreditProduct $creditProduct */ - $creditProduct = CreditProduct::findOrFail($request->input('product')); + /** @var ShopProduct $shopProduct */ + $shopProduct = ShopProduct::findOrFail($request->input('product')); /** @var User $user */ $user = Auth::user(); @@ -305,8 +310,7 @@ class PaymentController extends Controller // check if payment is 100% completed and payment does not exist in db already if ($paymentSession->status == "complete" && $paymentIntent->status == "succeeded" && $paymentDbEntry == 0) { - //update credits - $user->increment('credits', $creditProduct->quantity); + //update server limit if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) { @@ -315,6 +319,13 @@ class PaymentController extends Controller } } + //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 if ($user->role == 'member') { $user->update(['role' => 'client']); @@ -325,15 +336,15 @@ class PaymentController extends Controller 'user_id' => $user->id, 'payment_id' => $paymentSession->payment_intent, 'payment_method' => 'stripe', - 'type' => 'Credits', + 'type' => $shopProduct->type, 'status' => 'paid', - 'amount' => $creditProduct->quantity, - 'price' => $creditProduct->price, - 'tax_value' => $creditProduct->getTaxValue(), - 'total_price' => $creditProduct->getTotalPrice(), - 'tax_percent' => $creditProduct->getTaxPercent(), - 'currency_code' => $creditProduct->currency_code, - 'credit_product_id' => $creditProduct->id, + '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 @@ -343,7 +354,7 @@ class PaymentController extends Controller //only create invoice if SETTINGS::INVOICE:ENABLED is true if (config('SETTINGS::INVOICE:ENABLED') == 'true') { - $this->createInvoice($user, $payment, 'paid', $creditProduct->currency_code); + $this->createInvoice($user, $payment, 'paid', $shopProduct->currency_code); } //redirect back to home @@ -356,20 +367,20 @@ class PaymentController extends Controller 'user_id' => $user->id, 'payment_id' => $paymentSession->payment_intent, 'payment_method' => 'stripe', - 'type' => 'Credits', + 'type' => $shopProduct->type, 'status' => 'processing', - 'amount' => $creditProduct->quantity, - 'price' => $creditProduct->price, - 'tax_value' => $creditProduct->getTaxValue(), - 'total_price' => $creditProduct->getTotalPrice(), - 'tax_percent' => $creditProduct->getTaxPercent(), - 'currency_code' => $creditProduct->currency_code, - 'credit_product_id' => $creditProduct->id, + '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', $creditProduct->currency_code); + $this->createInvoice($user, $payment, 'paid', $shopProduct->currency_code); } //redirect back to home @@ -405,8 +416,7 @@ class PaymentController extends Controller $user = User::where('id', $payment->user_id)->first(); if ($paymentIntent->status == 'succeeded' && $payment->status == 'processing') { - // Increment User Credits - $user->increment('credits', $payment->amount); + //update server limit if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) { @@ -414,6 +424,12 @@ class PaymentController extends Controller $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 if ($user->role == 'member') { @@ -505,7 +521,7 @@ class PaymentController extends Controller protected function createInvoice($user, $payment, $paymentStatus, $currencyCode) { - $creditProduct = CreditProduct::where('id', $payment->credit_product_id)->first(); + $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; @@ -531,8 +547,8 @@ class PaymentController extends Controller ], ]); $item = (new InvoiceItem()) - ->title($creditProduct->description) - ->pricePerUnit($creditProduct->price); + ->title($shopProduct->description) + ->pricePerUnit($shopProduct->price); $notes = [ __("Payment method") . ": " . $payment->payment_method, @@ -546,7 +562,7 @@ class PaymentController extends Controller ->buyer($customer) ->seller($seller) ->discountByPercent(0) - ->taxRate(floatval($creditProduct->getTaxPercent())) + ->taxRate(floatval($shopProduct->getTaxPercent())) ->shipping(0) ->addItem($item) ->status(__($paymentStatus)) diff --git a/app/Http/Controllers/Admin/CreditProductController.php b/app/Http/Controllers/Admin/ShopProductController.php similarity index 73% rename from app/Http/Controllers/Admin/CreditProductController.php rename to app/Http/Controllers/Admin/ShopProductController.php index e510f76e..e5930032 100644 --- a/app/Http/Controllers/Admin/CreditProductController.php +++ b/app/Http/Controllers/Admin/ShopProductController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers\Admin; -use App\Models\CreditProduct; +use App\Models\ShopProduct; use App\Models\Settings; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; @@ -13,7 +13,7 @@ use Illuminate\Http\Response; use Illuminate\Routing\Controller; use Illuminate\Validation\Rule; -class CreditProductController extends Controller +class ShopProductController extends Controller { /** * Display a listing of the resource. @@ -66,7 +66,7 @@ class CreditProductController extends Controller ]); $disabled = !is_null($request->input('disabled')); - CreditProduct::create(array_merge($request->all(), ['disabled' => $disabled])); + ShopProduct::create(array_merge($request->all(), ['disabled' => $disabled])); return redirect()->route('admin.store.index')->with('success', __('Store item has been created!')); } @@ -74,10 +74,10 @@ class CreditProductController extends Controller /** * Display the specified resource. * - * @param CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return Response */ - public function show(CreditProduct $creditProduct) + public function show(ShopProduct $shopProduct) { // } @@ -85,14 +85,14 @@ class CreditProductController extends Controller /** * Show the form for editing the specified resource. * - * @param CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return Application|Factory|View|Response */ - public function edit(CreditProduct $creditProduct) + public function edit(ShopProduct $shopProduct) { return view('admin.store.edit', [ 'currencyCodes' => config('currency_codes'), - 'creditProduct' => $creditProduct + 'shopProduct' => $shopProduct ]); } @@ -100,10 +100,10 @@ class CreditProductController extends Controller * Update the specified resource in storage. * * @param Request $request - * @param CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return RedirectResponse */ - public function update(Request $request, CreditProduct $creditProduct) + public function update(Request $request, ShopProduct $shopProduct) { $request->validate([ "disabled" => "nullable", @@ -116,19 +116,19 @@ class CreditProductController extends Controller ]); $disabled = !is_null($request->input('disabled')); - $creditProduct->update(array_merge($request->all(), ['disabled' => $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 CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return RedirectResponse */ - public function disable(Request $request, CreditProduct $creditProduct) + public function disable(Request $request, ShopProduct $shopProduct) { - $creditProduct->update(['disabled' => !$creditProduct->disabled]); + $shopProduct->update(['disabled' => !$shopProduct->disabled]); return redirect()->route('admin.store.index')->with('success', __('Product has been updated!')); } @@ -136,50 +136,50 @@ class CreditProductController extends Controller /** * Remove the specified resource from storage. * - * @param CreditProduct $creditProduct + * @param ShopProduct $shopProduct * @return RedirectResponse */ - public function destroy(CreditProduct $creditProduct) + public function destroy(ShopProduct $shopProduct) { - $creditProduct->delete(); + $shopProduct->delete(); return redirect()->back()->with('success', __('Store item has been removed!')); } public function dataTable() { - $query = CreditProduct::query(); + $query = ShopProduct::query(); return datatables($query) - ->addColumn('actions', function (CreditProduct $creditProduct) { + ->addColumn('actions', function (ShopProduct $shopProduct) { return ' - + - '; }) - ->addColumn('disabled', function (CreditProduct $creditProduct) { - $checked = $creditProduct->disabled == false ? "checked" : ""; + ->addColumn('disabled', function (ShopProduct $shopProduct) { + $checked = $shopProduct->disabled == false ? "checked" : ""; return ' - '; }) - ->editColumn('created_at', function (CreditProduct $creditProduct) { - return $creditProduct->created_at ? $creditProduct->created_at->diffForHumans() : ''; + ->editColumn('created_at', function (ShopProduct $shopProduct) { + return $shopProduct->created_at ? $shopProduct->created_at->diffForHumans() : ''; }) - ->editColumn('price', function (CreditProduct $creditProduct) { - return $creditProduct->formatToCurrency($creditProduct->price); + ->editColumn('price', function (ShopProduct $shopProduct) { + return $shopProduct->formatToCurrency($shopProduct->price); }) ->rawColumns(['actions', 'disabled']) ->make(); diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index d55ba7a2..7c293a58 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -304,8 +304,8 @@ class UserController extends Controller ->editColumn('name', function (User $user) { return 'pterodactyl_id . '">' . strip_tags($user->name) . ''; }) - ->orderColumn('last_seen', function ($query, $order) { - $query->orderBy('last_seen', $order); + ->orderColumn('last_seen', function ($query) { + $query->orderBy('last_seen', "desc"); }) ->rawColumns(['avatar', 'name', 'credits', 'role', 'usage', 'actions', 'last_seen']) ->make(true); diff --git a/app/Http/Controllers/StoreController.php b/app/Http/Controllers/StoreController.php index c3717653..8995d659 100644 --- a/app/Http/Controllers/StoreController.php +++ b/app/Http/Controllers/StoreController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers; -use App\Models\CreditProduct; +use App\Models\ShopProduct; use App\Models\Settings; use Illuminate\Support\Facades\Auth; @@ -30,7 +30,7 @@ class StoreController extends Controller } return view('store.index')->with([ - 'products' => CreditProduct::where('disabled', '=', false)->orderBy('price', 'asc')->get(), + 'products' => ShopProduct::where('disabled', '=', false)->orderBy('type', 'asc')->orderBy('price', 'asc')->get(), 'isPaymentSetup' => $isPaymentSetup, ]); } diff --git a/app/Models/Payment.php b/app/Models/Payment.php index d8151908..df6acb24 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -32,7 +32,7 @@ class Payment extends Model 'total_price', 'tax_percent', 'currency_code', - 'credit_product_id', + 'shop_item_product_id', ]; public static function boot() diff --git a/app/Models/CreditProduct.php b/app/Models/ShopProduct.php similarity index 89% rename from app/Models/CreditProduct.php rename to app/Models/ShopProduct.php index 52c5873a..4d158be8 100644 --- a/app/Models/CreditProduct.php +++ b/app/Models/ShopProduct.php @@ -8,7 +8,7 @@ use NumberFormatter; use Spatie\Activitylog\Traits\LogsActivity; use App\Models\Configuration; -class CreditProduct extends Model +class ShopProduct extends Model { use LogsActivity; /** @@ -33,10 +33,10 @@ class CreditProduct extends Model { parent::boot(); - static::creating(function (CreditProduct $creditProduct) { + static::creating(function (ShopProduct $shopProduct) { $client = new Client(); - $creditProduct->{$creditProduct->getKeyName()} = $client->generateId($size = 21); + $shopProduct->{$shopProduct->getKeyName()} = $client->generateId($size = 21); }); } diff --git a/app/Notifications/WelcomeMessage.php b/app/Notifications/WelcomeMessage.php index a7854478..3841fc83 100644 --- a/app/Notifications/WelcomeMessage.php +++ b/app/Notifications/WelcomeMessage.php @@ -42,17 +42,17 @@ class WelcomeMessage extends Notification implements ShouldQueue $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') . ".Hello {$this->user->name}, Welcome to our dashboard!
-You can verify your e-mail address and link/verify your Discord account.
+".__("Hello")." {$this->user->name}, ".__("Welcome to our dashboard")."!
+".__("You can verify your e-mail address and link/verify your Discord account.")."
" . $this->AdditionalLines() . "
-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') . "
".__("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') . "