Merge branch 'ControlPanel-gg:development' into development
This commit is contained in:
commit
701beefd54
|
@ -26,8 +26,8 @@ class CreditProductController extends Controller
|
||||||
|
|
||||||
if (
|
if (
|
||||||
env('APP_ENV') == 'local' ||
|
env('APP_ENV') == 'local' ||
|
||||||
Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SECRET") && Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID") ||
|
config("SETTINGS::PAYMENTS:PAYPAL:SECRET") && config("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID") ||
|
||||||
Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:SECRET") && Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET") && Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:METHODS")
|
config("SETTINGS::PAYMENTS:STRIPE:SECRET") && config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET") && config("SETTINGS::PAYMENTS:STRIPE:METHODS")
|
||||||
) $isPaymentSetup = true;
|
) $isPaymentSetup = true;
|
||||||
|
|
||||||
return view('admin.store.index', [
|
return view('admin.store.index', [
|
||||||
|
|
|
@ -134,7 +134,7 @@ class PaymentController extends Controller
|
||||||
*/
|
*/
|
||||||
protected function getPaypalClientId()
|
protected function getPaypalClientId()
|
||||||
{
|
{
|
||||||
return env('APP_ENV') == 'local' ? Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID") : Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID");
|
return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_CLIENT_ID") : config("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -142,7 +142,7 @@ class PaymentController extends Controller
|
||||||
*/
|
*/
|
||||||
protected function getPaypalClientSecret()
|
protected function getPaypalClientSecret()
|
||||||
{
|
{
|
||||||
return env('APP_ENV') == 'local' ? Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") : Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SECRET");
|
return env('APP_ENV') == 'local' ? config("SETTINGS::PAYMENTS:PAYPAL:SANDBOX_SECRET") : config("SETTINGS::PAYMENTS:PAYPAL:SECRET");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -167,9 +167,9 @@ class PaymentController extends Controller
|
||||||
$user->increment('credits', $creditProduct->quantity);
|
$user->increment('credits', $creditProduct->quantity);
|
||||||
|
|
||||||
//update server limit
|
//update server limit
|
||||||
if (Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) {
|
if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) {
|
||||||
if ($user->server_limit < Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) {
|
if ($user->server_limit < config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) {
|
||||||
$user->update(['server_limit' => Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]);
|
$user->update(['server_limit' => config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,9 +308,9 @@ class PaymentController extends Controller
|
||||||
$user->increment('credits', $creditProduct->quantity);
|
$user->increment('credits', $creditProduct->quantity);
|
||||||
|
|
||||||
//update server limit
|
//update server limit
|
||||||
if (Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) {
|
if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) {
|
||||||
if ($user->server_limit < Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) {
|
if ($user->server_limit < config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) {
|
||||||
$user->update(['server_limit' => Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]);
|
$user->update(['server_limit' => config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,9 +408,9 @@ class PaymentController extends Controller
|
||||||
$user->increment('credits', $payment->amount);
|
$user->increment('credits', $payment->amount);
|
||||||
|
|
||||||
//update server limit
|
//update server limit
|
||||||
if (Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) {
|
if (config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE') !== 0) {
|
||||||
if ($user->server_limit < Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) {
|
if ($user->server_limit < config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')) {
|
||||||
$user->update(['server_limit' => Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]);
|
$user->update(['server_limit' => config('SETTINGS::USER:SERVER_LIMIT_AFTER_IRL_PURCHASE')]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -487,8 +487,8 @@ class PaymentController extends Controller
|
||||||
protected function getStripeSecret()
|
protected function getStripeSecret()
|
||||||
{
|
{
|
||||||
return env('APP_ENV') == 'local'
|
return env('APP_ENV') == 'local'
|
||||||
? Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:TEST_SECRET")
|
? config("SETTINGS::PAYMENTS:STRIPE:TEST_SECRET")
|
||||||
: Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:SECRET");
|
: config("SETTINGS::PAYMENTS:STRIPE:SECRET");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -497,8 +497,8 @@ class PaymentController extends Controller
|
||||||
protected function getStripeEndpointSecret()
|
protected function getStripeEndpointSecret()
|
||||||
{
|
{
|
||||||
return env('APP_ENV') == 'local'
|
return env('APP_ENV') == 'local'
|
||||||
? Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET")
|
? config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_TEST_SECRET")
|
||||||
: Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET");
|
: config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -511,13 +511,13 @@ class PaymentController extends Controller
|
||||||
$logoPath = storage_path('app/public/logo.png');
|
$logoPath = storage_path('app/public/logo.png');
|
||||||
|
|
||||||
$seller = new Party([
|
$seller = new Party([
|
||||||
'name' => Settings::getValueByKey("SETTINGS::INVOICE:COMPANY_NAME"),
|
'name' => config("SETTINGS::INVOICE:COMPANY_NAME"),
|
||||||
'phone' => Settings::getValueByKey("SETTINGS::INVOICE:COMPANY_PHONE"),
|
'phone' => config("SETTINGS::INVOICE:COMPANY_PHONE"),
|
||||||
'address' => Settings::getValueByKey("SETTINGS::INVOICE:COMPANY_ADDRESS"),
|
'address' => config("SETTINGS::INVOICE:COMPANY_ADDRESS"),
|
||||||
'vat' => Settings::getValueByKey("SETTINGS::INVOICE:COMPANY_VAT"),
|
'vat' => config("SETTINGS::INVOICE:COMPANY_VAT"),
|
||||||
'custom_fields' => [
|
'custom_fields' => [
|
||||||
'E-Mail' => Settings::getValueByKey("SETTINGS::INVOICE:COMPANY_MAIL"),
|
'E-Mail' => config("SETTINGS::INVOICE:COMPANY_MAIL"),
|
||||||
"Web" => Settings::getValueByKey("SETTINGS::INVOICE:COMPANY_WEBSITE")
|
"Web" => config("SETTINGS::INVOICE:COMPANY_WEBSITE")
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -552,7 +552,7 @@ class PaymentController extends Controller
|
||||||
->series(now()->format('mY'))
|
->series(now()->format('mY'))
|
||||||
->delimiter("-")
|
->delimiter("-")
|
||||||
->sequence($newInvoiceID)
|
->sequence($newInvoiceID)
|
||||||
->serialNumberFormat(Settings::getValueByKey("SETTINGS::INVOICE:PREFIX") . '{DELIMITER}{SERIES}{SEQUENCE}')
|
->serialNumberFormat(config("SETTINGS::INVOICE:PREFIX") . '{DELIMITER}{SERIES}{SEQUENCE}')
|
||||||
->notes($notes);
|
->notes($notes);
|
||||||
|
|
||||||
if (file_exists($logoPath)) {
|
if (file_exists($logoPath)) {
|
||||||
|
|
|
@ -40,7 +40,8 @@ class ProductController extends Controller
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function clone(Request $request , Product $product){
|
public function clone(Request $request, Product $product)
|
||||||
|
{
|
||||||
return view('admin.products.create', [
|
return view('admin.products.create', [
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
'locations' => Location::with('nodes')->get(),
|
'locations' => Location::with('nodes')->get(),
|
||||||
|
@ -94,7 +95,7 @@ class ProductController extends Controller
|
||||||
{
|
{
|
||||||
return view('admin.products.show', [
|
return view('admin.products.show', [
|
||||||
'product' => $product,
|
'product' => $product,
|
||||||
'minimum_credits' => Settings::getValueByKey("SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER"),
|
'minimum_credits' => config("SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER"),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,8 @@ class ServerController extends Controller
|
||||||
* @param Server $server
|
* @param Server $server
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function toggleSuspended(Server $server){
|
public function toggleSuspended(Server $server)
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
$server->isSuspended() ? $server->unSuspend() : $server->suspend();
|
$server->isSuspended() ? $server->unSuspend() : $server->suspend();
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
|
@ -162,7 +163,7 @@ class ServerController extends Controller
|
||||||
return $server->suspended ? $server->suspended->diffForHumans() : '';
|
return $server->suspended ? $server->suspended->diffForHumans() : '';
|
||||||
})
|
})
|
||||||
->editColumn('name', function (Server $server) {
|
->editColumn('name', function (Server $server) {
|
||||||
return '<a class="text-info" target="_blank" href="' . Settings::getValueByKey("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id . '">' . $server->name . '</a>';
|
return '<a class="text-info" target="_blank" href="' . config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/servers/view/' . $server->pterodactyl_id . '">' . $server->name . '</a>';
|
||||||
})
|
})
|
||||||
->rawColumns(['user', 'actions', 'status', 'name'])
|
->rawColumns(['user', 'actions', 'status', 'name'])
|
||||||
->make();
|
->make();
|
||||||
|
|
|
@ -226,7 +226,8 @@ class UserController extends Controller
|
||||||
* @param User $user
|
* @param User $user
|
||||||
* @return RedirectResponse
|
* @return RedirectResponse
|
||||||
*/
|
*/
|
||||||
public function toggleSuspended(User $user){
|
public function toggleSuspended(User $user)
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
!$user->isSuspended() ? $user->suspend() : $user->unSuspend();
|
!$user->isSuspended() ? $user->suspend() : $user->unSuspend();
|
||||||
} catch (Exception $exception) {
|
} catch (Exception $exception) {
|
||||||
|
@ -301,7 +302,7 @@ class UserController extends Controller
|
||||||
return '<span class="badge ' . $badgeColor . '">' . $user->role . '</span>';
|
return '<span class="badge ' . $badgeColor . '">' . $user->role . '</span>';
|
||||||
})
|
})
|
||||||
->editColumn('name', function (User $user) {
|
->editColumn('name', function (User $user) {
|
||||||
return '<a class="text-info" target="_blank" href="' . Settings::getValueByKey("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/users/view/' . $user->pterodactyl_id . '">' . $user->name . '</a>';
|
return '<a class="text-info" target="_blank" href="' . config("SETTINGS::SYSTEM:PTERODACTYL:URL") . '/admin/users/view/' . $user->pterodactyl_id . '">' . $user->name . '</a>';
|
||||||
})
|
})
|
||||||
->orderColumn('last_seen', function ($query, $order) {
|
->orderColumn('last_seen', function ($query, $order) {
|
||||||
$query->orderBy('last_seen', $order);
|
$query->orderBy('last_seen', $order);
|
||||||
|
|
|
@ -242,8 +242,8 @@ class UserController extends Controller
|
||||||
$user = User::create([
|
$user = User::create([
|
||||||
'name' => $request->input('name'),
|
'name' => $request->input('name'),
|
||||||
'email' => $request->input('email'),
|
'email' => $request->input('email'),
|
||||||
'credits' => Settings::getValueByKey('SETTINGS::USER:INITIAL_CREDITS', 150),
|
'credits' => config('SETTINGS::USER:INITIAL_CREDITS', 150),
|
||||||
'server_limit' => Settings::getValueByKey('SETTINGS::USER:INITIAL_SERVER_LIMIT', 1),
|
'server_limit' => config('SETTINGS::USER:INITIAL_SERVER_LIMIT', 1),
|
||||||
'password' => Hash::make($request->input('password')),
|
'password' => Hash::make($request->input('password')),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class SocialiteController extends Controller
|
||||||
{
|
{
|
||||||
public function redirect()
|
public function redirect()
|
||||||
{
|
{
|
||||||
$scopes = !empty(Settings::getValueByKey("SETTINGS::DISCORD:BOT_TOKEN")) && !empty(Settings::getValueByKey("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')
|
return Socialite::driver('discord')
|
||||||
->scopes($scopes)
|
->scopes($scopes)
|
||||||
|
@ -31,17 +31,17 @@ class SocialiteController extends Controller
|
||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = Auth::user();
|
$user = Auth::user();
|
||||||
$discord = Socialite::driver('discord')->user();
|
$discord = Socialite::driver('discord')->user();
|
||||||
$botToken = Settings::getValueByKey("SETTINGS::DISCORD:BOT_TOKEN");
|
$botToken = config("SETTINGS::DISCORD:BOT_TOKEN");
|
||||||
$guildId = Settings::getValueByKey("SETTINGS::DISCORD:GUILD_ID");
|
$guildId = config("SETTINGS::DISCORD:GUILD_ID");
|
||||||
$roleId = Settings::getValueByKey("SETTINGS::DISCORD:ROLE_ID");
|
$roleId = config("SETTINGS::DISCORD:ROLE_ID");
|
||||||
|
|
||||||
//save / update discord_users
|
//save / update discord_users
|
||||||
if (is_null($user->discordUser)) {
|
if (is_null($user->discordUser)) {
|
||||||
//create discord user in db
|
//create discord user in db
|
||||||
DiscordUser::create(array_merge($discord->user, ['user_id' => Auth::user()->id]));
|
DiscordUser::create(array_merge($discord->user, ['user_id' => Auth::user()->id]));
|
||||||
//update user
|
//update user
|
||||||
Auth::user()->increment('credits', Settings::getValueByKey('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD'));
|
Auth::user()->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_DISCORD'));
|
||||||
Auth::user()->increment('server_limit', Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_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()]);
|
Auth::user()->update(['discord_verified_at' => now()]);
|
||||||
} else {
|
} else {
|
||||||
$user->discordUser->update($discord->user);
|
$user->discordUser->update($discord->user);
|
||||||
|
@ -55,8 +55,10 @@ class SocialiteController extends Controller
|
||||||
'Authorization' => 'Bot ' . $botToken,
|
'Authorization' => 'Bot ' . $botToken,
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
]
|
]
|
||||||
)->put("https://discord.com/api/guilds/{$guildId}/members/{$discord->id}",
|
)->put(
|
||||||
['access_token' => $discord->token]);
|
"https://discord.com/api/guilds/{$guildId}/members/{$discord->id}",
|
||||||
|
['access_token' => $discord->token]
|
||||||
|
);
|
||||||
|
|
||||||
//give user a role in the discord server
|
//give user a role in the discord server
|
||||||
if (!empty($roleId)) {
|
if (!empty($roleId)) {
|
||||||
|
@ -65,8 +67,10 @@ class SocialiteController extends Controller
|
||||||
'Authorization' => 'Bot ' . $botToken,
|
'Authorization' => 'Bot ' . $botToken,
|
||||||
'Content-Type' => 'application/json',
|
'Content-Type' => 'application/json',
|
||||||
]
|
]
|
||||||
)->put("https://discord.com/api/guilds/{$guildId}/members/{$discord->id}/roles/{$roleId}",
|
)->put(
|
||||||
['access_token' => $discord->token]);
|
"https://discord.com/api/guilds/{$guildId}/members/{$discord->id}/roles/{$roleId}",
|
||||||
|
['access_token' => $discord->token]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,17 +15,17 @@ class StoreController extends Controller
|
||||||
|
|
||||||
if (
|
if (
|
||||||
env('APP_ENV') == 'local' ||
|
env('APP_ENV') == 'local' ||
|
||||||
Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:SECRET") && Settings::getValueByKey("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID") ||
|
config("SETTINGS::PAYMENTS:PAYPAL:SECRET") && config("SETTINGS::PAYMENTS:PAYPAL:CLIENT_ID") ||
|
||||||
Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:SECRET") && Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET") && Settings::getValueByKey("SETTINGS::PAYMENTS:STRIPE:METHODS")
|
config("SETTINGS::PAYMENTS:STRIPE:SECRET") && config("SETTINGS::PAYMENTS:STRIPE:ENDPOINT_SECRET") && config("SETTINGS::PAYMENTS:STRIPE:METHODS")
|
||||||
) $isPaymentSetup = true;
|
) $isPaymentSetup = true;
|
||||||
|
|
||||||
//Required Verification for creating an server
|
//Required Verification for creating an server
|
||||||
if (Settings::getValueByKey('SETTINGS::USER:FORCE_EMAIL_VERIFICATION', false) === 'true' && !Auth::user()->hasVerifiedEmail()) {
|
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."));
|
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
|
//Required Verification for creating an server
|
||||||
if (Settings::getValueByKey('SETTINGS::USER:FORCE_DISCORD_VERIFICATION', false) === 'true' && !Auth::user()->discordUser) {
|
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 redirect()->route('profile.index')->with('error', __("You are required to link your discord account before you can purchase Credits"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class UnsuspendServers implements ShouldQueue
|
||||||
*/
|
*/
|
||||||
public function handle(UserUpdateCreditsEvent $event)
|
public function handle(UserUpdateCreditsEvent $event)
|
||||||
{
|
{
|
||||||
if ($event->user->credits > Settings::getValueByKey('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER' , 50)){
|
if ($event->user->credits > config('SETTINGS::USER:MINIMUM_REQUIRED_CREDITS_TO_MAKE_SERVER', 50)) {
|
||||||
/** @var Server $server */
|
/** @var Server $server */
|
||||||
foreach ($event->user->servers as $server) {
|
foreach ($event->user->servers as $server) {
|
||||||
if ($server->isSuspended()) $server->unSuspend();
|
if ($server->isSuspended()) $server->unSuspend();
|
||||||
|
|
|
@ -24,7 +24,7 @@ class Verified
|
||||||
*/
|
*/
|
||||||
public function handle($event)
|
public function handle($event)
|
||||||
{
|
{
|
||||||
$event->user->increment('server_limit' , Settings::getValueByKey('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL'));
|
$event->user->increment('server_limit', config('SETTINGS::USER:SERVER_LIMIT_REWARD_AFTER_VERIFY_EMAIL'));
|
||||||
$event->user->increment('credits' , Settings::getValueByKey('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL'));
|
$event->user->increment('credits', config('SETTINGS::USER:CREDITS_REWARD_AFTER_VERIFY_EMAIL'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ class CreditProduct extends Model
|
||||||
*/
|
*/
|
||||||
public function getTaxPercent()
|
public function getTaxPercent()
|
||||||
{
|
{
|
||||||
$tax = Settings::getValueByKey("SETTINGS::PAYMENTS:SALES_TAX");
|
$tax = config("SETTINGS::PAYMENTS:SALES_TAX");
|
||||||
return $tax < 0 ? 0 : $tax;
|
return $tax < 0 ? 0 : $tax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue