commit
ce68708cdc
|
@ -33,6 +33,7 @@ class System
|
||||||
"credits-reward-amount-email" => "required|min:0|integer",
|
"credits-reward-amount-email" => "required|min:0|integer",
|
||||||
"server-limit-discord" => "required|min:0|integer",
|
"server-limit-discord" => "required|min:0|integer",
|
||||||
"server-limit-email" => "required|min:0|integer",
|
"server-limit-email" => "required|min:0|integer",
|
||||||
|
"server-limit-purchase" => "required|min:0|integer",
|
||||||
"pterodactyl-api-key" => "required|string",
|
"pterodactyl-api-key" => "required|string",
|
||||||
"pterodactyl-url" => "required|string",
|
"pterodactyl-url" => "required|string",
|
||||||
|
|
||||||
|
@ -59,9 +60,11 @@ class System
|
||||||
"SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL" => "credits-reward-amount-email",
|
"SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL" => "credits-reward-amount-email",
|
||||||
"SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD" => "server-limit-discord",
|
"SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_DISCORD" => "server-limit-discord",
|
||||||
"SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL" => "server-limit-email",
|
"SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL" => "server-limit-email",
|
||||||
|
"SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE" => "server-limit-purchase",
|
||||||
"SETTINGS::MISC:PHPMYADMIN:URL" => "phpmyadmin-url",
|
"SETTINGS::MISC:PHPMYADMIN:URL" => "phpmyadmin-url",
|
||||||
"SETTINGS::SYSTEM:PTERODACTYL:URL" => "pterodactyl-url",
|
"SETTINGS::SYSTEM:PTERODACTYL:URL" => "pterodactyl-url",
|
||||||
"SETTINGS::SYSTEM:PTERODACTYL:TOKEN" => "pterodactyl-api-key",
|
"SETTINGS::SYSTEM:PTERODACTYL:TOKEN" => "pterodactyl-api-key",
|
||||||
|
"SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO" => "enable-login-logo",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,13 +81,16 @@ class System
|
||||||
{
|
{
|
||||||
$request->validate([
|
$request->validate([
|
||||||
'icon' => 'nullable|max:10000|mimes:jpg,png,jpeg',
|
'icon' => 'nullable|max:10000|mimes:jpg,png,jpeg',
|
||||||
|
'logo' => 'nullable|max:10000|mimes:jpg,png,jpeg',
|
||||||
'favicon' => 'nullable|max:10000|mimes:ico',
|
'favicon' => 'nullable|max:10000|mimes:ico',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($request->hasFile('icon')) {
|
if ($request->hasFile('icon')) {
|
||||||
$request->file('icon')->storeAs('public', 'icon.png');
|
$request->file('icon')->storeAs('public', 'icon.png');
|
||||||
}
|
}
|
||||||
|
if ($request->hasFile('logo')) {
|
||||||
|
$request->file('logo')->storeAs('public', 'logo.png');
|
||||||
|
}
|
||||||
if ($request->hasFile('favicon')) {
|
if ($request->hasFile('favicon')) {
|
||||||
$request->file('favicon')->storeAs('public', 'favicon.ico');
|
$request->file('favicon')->storeAs('public', 'favicon.ico');
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,8 +123,15 @@ class UserController extends Controller
|
||||||
"credits" => "required|numeric|min:0|max:99999999",
|
"credits" => "required|numeric|min:0|max:99999999",
|
||||||
"server_limit" => "required|numeric|min:0|max:1000000",
|
"server_limit" => "required|numeric|min:0|max:1000000",
|
||||||
"role" => Rule::in(['admin', 'mod', 'client', 'member']),
|
"role" => Rule::in(['admin', 'mod', 'client', 'member']),
|
||||||
|
"referral_code" => "required|string|min:2|max:32",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (User::where('referral_code', '=', $request->input('referral_code'))->exists()) {
|
||||||
|
throw ValidationException::withMessages([
|
||||||
|
'referral_code' => [__("Another User with this Referral-Code already exists!")]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($this->pterodactyl->getUser($request->input('pterodactyl_id'))['errors'])) {
|
if (isset($this->pterodactyl->getUser($request->input('pterodactyl_id'))['errors'])) {
|
||||||
throw ValidationException::withMessages([
|
throw ValidationException::withMessages([
|
||||||
'pterodactyl_id' => [__("User does not exists on pterodactyl's panel")]
|
'pterodactyl_id' => [__("User does not exists on pterodactyl's panel")]
|
||||||
|
|
1081
composer.lock
generated
1081
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@ use App\Models\Settings;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
'version' => '0.7.6',
|
'version' => '0.7.7',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -17,7 +17,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'name' => env('APP_NAME', 'Laravel'),
|
'name' => env('APP_NAME', 'Controlpanel.gg'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
32
database/migrations/2022_07_12_051152_decimals-in-price.php
Normal file
32
database/migrations/2022_07_12_051152_decimals-in-price.php
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class DecimalsInPrice extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->decimal('price',['11','2'])->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('products', function (Blueprint $table) {
|
||||||
|
$table->integer('price')->change();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -72,7 +72,7 @@
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
ajax: "{{ route('admin.payments.datatable') }}",
|
ajax: "{{ route('admin.payments.datatable') }}",
|
||||||
order: [[ 9, "asc" ]],
|
order: [[ 9, "desc" ]],
|
||||||
columns: [
|
columns: [
|
||||||
{data: 'id',name: 'payments.id'},
|
{data: 'id',name: 'payments.id'},
|
||||||
{data: 'type'},
|
{data: 'type'},
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="price">{{__('Price in')}} {{CREDITS_DISPLAY_NAME}}</label>
|
<label for="price">{{__('Price in')}} {{CREDITS_DISPLAY_NAME}}</label>
|
||||||
<input value="{{$product->price ?? old('price')}}" id="price" name="price"
|
<input value="{{$product->price ?? old('price')}}" id="price" name="price" step=".01"
|
||||||
type="number"
|
type="number"
|
||||||
class="form-control @error('price') is-invalid @enderror"
|
class="form-control @error('price') is-invalid @enderror"
|
||||||
required="required">
|
required="required">
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="price">{{__('Price in')}} {{ CREDITS_DISPLAY_NAME }}</label>
|
<label for="price">{{__('Price in')}} {{ CREDITS_DISPLAY_NAME }}</label>
|
||||||
<input value="{{ $product->price }}" id="price" name="price" type="number"
|
<input value="{{ $product->price }}" id="price" name="price" type="number" step=".01"
|
||||||
class="form-control @error('price') is-invalid @enderror"
|
class="form-control @error('price') is-invalid @enderror"
|
||||||
required="required">
|
required="required">
|
||||||
@error('price')
|
@error('price')
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<th width="20"></th>
|
<th width="20"></th>
|
||||||
<th>{{__('Name')}}</th>
|
<th>{{__('Name')}}</th>
|
||||||
<th>{{__('User')}}</th>
|
<th>{{__('User')}}</th>
|
||||||
|
<th>{{__('Server id')}}</th>
|
||||||
<th>{{__('Config')}}</th>
|
<th>{{__('Config')}}</th>
|
||||||
<th>{{__('Suspended at')}}</th>
|
<th>{{__('Suspended at')}}</th>
|
||||||
<th>{{__('Created at')}}</th>
|
<th>{{__('Created at')}}</th>
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
{data: 'status' , name : 'servers.suspended'},
|
{data: 'status' , name : 'servers.suspended'},
|
||||||
{data: 'name'},
|
{data: 'name'},
|
||||||
{data: 'user' , name : 'user.name'},
|
{data: 'user' , name : 'user.name'},
|
||||||
|
{data: 'identifier'},
|
||||||
{data: 'resources' , name : 'product.name'},
|
{data: 'resources' , name : 'product.name'},
|
||||||
{data: 'suspended'},
|
{data: 'suspended'},
|
||||||
{data: 'created_at'},
|
{data: 'created_at'},
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
data-content="Tax Value that will be added to the total price of the order. <br><br> Example: 19 results in (19%)"
|
data-content="Tax Value that will be added to the total price of the order. <br><br> Example: 19 results in (19%)"
|
||||||
class="fas fa-info-circle"></i>
|
class="fas fa-info-circle"></i>
|
||||||
</div>
|
</div>
|
||||||
<input x-model="sales-tax" id="sales-tax" name="sales-tax" type="number"
|
<input x-model="sales-tax" id="sales-tax" name="sales-tax" type="number" step=".01"
|
||||||
value="{{ config('SETTINGS::PAYMENTS:SALES_TAX') }}"
|
value="{{ config('SETTINGS::PAYMENTS:SALES_TAX') }}"
|
||||||
class="form-control @error('sales-tax') is-invalid @enderror">
|
class="form-control @error('sales-tax') is-invalid @enderror">
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -150,6 +150,13 @@
|
||||||
value="{{ config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') }}"
|
value="{{ config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL') }}"
|
||||||
class="form-control @error('server-limit-email') is-invalid @enderror" required>
|
class="form-control @error('server-limit-email') is-invalid @enderror" required>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="custom-control mb-3 p-0">
|
||||||
|
<label for="server-limit-purchase">{{ __('Server Limit after Credits Purchase') }}</label>
|
||||||
|
<input x-model="server-limit-purchase" id="server-limit-purchase" name="server-limit-purchase"
|
||||||
|
type="number"
|
||||||
|
value="{{ config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') }}"
|
||||||
|
class="form-control @error('server-limit-purchase') is-invalid @enderror" required>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -173,6 +180,21 @@
|
||||||
class="form-control @error('allocation-limit') is-invalid @enderror" required>
|
class="form-control @error('allocation-limit') is-invalid @enderror" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Design --}}
|
||||||
|
<div class="col-md-3 px-3">
|
||||||
|
<div class="row mb-2">
|
||||||
|
<div class="col text-center">
|
||||||
|
<h1>{{ __('Design') }}</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="custom-control mb-3 p-0">
|
||||||
|
<input value="true" id="enable-login-logo" name="enable-login-logo"
|
||||||
|
{{ config('SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO') == 'true' ? 'checked' : '' }}
|
||||||
|
type="checkbox">
|
||||||
|
<label for="enable-login-logo">{{ __('Enable Logo on Loginpage') }} </label>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-file mb-3 mt-3">
|
<div class="custom-file mb-3 mt-3">
|
||||||
<input type="file" accept="image/png,image/jpeg,image/jpg" class="custom-file-input" name="icon"
|
<input type="file" accept="image/png,image/jpeg,image/jpg" class="custom-file-input" name="icon"
|
||||||
|
@ -185,7 +207,19 @@
|
||||||
</span>
|
</span>
|
||||||
@enderror
|
@enderror
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="custom-file mb-3 mt-3">
|
||||||
|
<input type="file" accept="image/png,image/jpeg,image/jpg" class="custom-file-input" name="logo"
|
||||||
|
id="logo">
|
||||||
|
<label class="custom-file-label selected" for="logo">{{ __('Select Login-page Logo') }}</label>
|
||||||
|
</div>
|
||||||
|
@error('logo')
|
||||||
|
<span class="text-danger">
|
||||||
|
{{ $message }}
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="custom-file mb-3">
|
<div class="custom-file mb-3">
|
||||||
<input type="file" accept="image/x-icon" class="custom-file-input" name="favicon"
|
<input type="file" accept="image/x-icon" class="custom-file-input" name="favicon"
|
||||||
|
@ -200,7 +234,6 @@
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<button class="btn btn-primary ml-3 mt-3">{{ __('Submit') }}</button>
|
<button class="btn btn-primary ml-3 mt-3">{{ __('Submit') }}</button>
|
||||||
|
|
|
@ -114,12 +114,23 @@
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="name">{{__('Referral-Code')}}</label>
|
||||||
|
<input value="{{$user->referral_code}}" id="referral_code" name="referral_code" type="text"
|
||||||
|
class="form-control @error('referral_code') is-invalid @enderror" required="required">
|
||||||
|
@error('referral_code')
|
||||||
|
<div class="invalid-feedback">
|
||||||
|
{{$message}}
|
||||||
|
</div>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
@error('role')
|
@error('role')
|
||||||
<div class="text-danger">
|
<div class="text-danger">
|
||||||
{{$message}}
|
{{$message}}
|
||||||
</div>
|
</div>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
|
||||||
<div class="form-group text-right">
|
<div class="form-group text-right">
|
||||||
<button type="submit" class="btn btn-primary">{{__('Submit')}}</button>
|
<button type="submit" class="btn btn-primary">{{__('Submit')}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
serverSide: true,
|
serverSide: true,
|
||||||
stateSave: true,
|
stateSave: true,
|
||||||
ajax: "{{route('admin.users.datatable')}}",
|
ajax: "{{route('admin.users.datatable')}}",
|
||||||
order: [[ 10, "asc" ]],
|
order: [[ 11, "asc" ]],
|
||||||
columns: [
|
columns: [
|
||||||
{data: 'discordId', visible: false, name: 'discordUser.id'},
|
{data: 'discordId', visible: false, name: 'discordUser.id'},
|
||||||
{data: 'pterodactyl_id', visible: false},
|
{data: 'pterodactyl_id', visible: false},
|
||||||
|
|
|
@ -248,7 +248,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h5 class="card-title"><i class="fas fa-user-check mr-2"></i>{{__('Referals')}} ({{__("referral-code")}} : {{$user->referral_code}})</h5>
|
<h5 class="card-title"><i class="fas fa-user-check mr-2"></i>{{__('Referals')}} ({{__("referral-code")}}: {{$user->referral_code}})</h5>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body table-responsive">
|
<div class="card-body table-responsive">
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,12 @@
|
||||||
<div class="card card-outline card-primary">
|
<div class="card card-outline card-primary">
|
||||||
<div class="card-header text-center">
|
<div class="card-header text-center">
|
||||||
<a href="{{route('welcome')}}" class="h1"><b class="mr-1">{{config('app.name', 'Laravel')}}</b></a>
|
<a href="{{route('welcome')}}" class="h1"><b class="mr-1">{{config('app.name', 'Laravel')}}</b></a>
|
||||||
|
@if(config("SETTINGS::SYSTEM:ENABLE_LOGIN_LOGO"))
|
||||||
|
<img
|
||||||
|
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('logo.png')? asset('storage/logo.png'): asset('images/controlpanel_logo.png') }}"
|
||||||
|
alt="{{ config('app.name', 'Controlpanel.gg') }} Logo"
|
||||||
|
style="opacity: .8;max-width:100%">
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<p class="login-box-msg">{{__('Sign in to start your session')}}</p>
|
<p class="login-box-msg">{{__('Sign in to start your session')}}</p>
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
</div>
|
</div>
|
||||||
@if(config('SETTINGS::REFERRAL::ENABLED') == "true")
|
@if(config('SETTINGS::REFERRAL::ENABLED') == "true")
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<input type="text" value="{{ \Request::get('ref') }}" class="form-control" name="referral_code" placeholder="{{__('Referral code')}} ( {{__("optional")}} )">
|
<input type="text" value="{{ \Request::get('ref') }}" class="form-control" name="referral_code" placeholder="{{__('Referral code')}} ({{__("optional")}})">
|
||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<div class="input-group-text">
|
<div class="input-group-text">
|
||||||
<span class="fas fa-user-check"></span>
|
<span class="fas fa-user-check"></span>
|
||||||
|
|
|
@ -188,7 +188,7 @@
|
||||||
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png')? asset('storage/icon.png'): asset('images/controlpanel_logo.png') }}"
|
src="{{ \Illuminate\Support\Facades\Storage::disk('public')->exists('icon.png')? asset('storage/icon.png'): asset('images/controlpanel_logo.png') }}"
|
||||||
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
|
alt="{{ config('app.name', 'Laravel') }} Logo" class="brand-image img-circle"
|
||||||
style="opacity: .8">
|
style="opacity: .8">
|
||||||
<span class="brand-text font-weight-light">{{ config('app.name', 'Laravel') }}</span>
|
<span class="brand-text font-weight-light">{{ config('app.name', 'Controlpanel.gg') }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
|
|
|
@ -205,7 +205,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2 mb-2">
|
<div class="mt-2 mb-2">
|
||||||
<span class="card-text text-muted">{{ __('Description') }}</span>
|
<span class="card-text text-muted">{{ __('Description') }}</span>
|
||||||
<p class="card-text" x-text="product.description"></p>
|
<p class="card-text" style="white-space:pre" x-text="product.description"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-auto border rounded border-secondary">
|
<div class="mt-auto border rounded border-secondary">
|
||||||
|
|
Loading…
Reference in a new issue