Plan settings refactoring

This commit is contained in:
Čarodej
2022-01-11 15:20:33 +01:00
parent 1c188081b3
commit 68563b9e10
8 changed files with 175 additions and 26 deletions
+8
View File
@@ -1,3 +1,9 @@
@php
use VueFileManager\Subscription\Domain\Plans\Models\Plan;
$plan = Plan::where('status', 'active')->where('type', 'metered');
@endphp
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
@@ -78,6 +84,8 @@
// Metered
allowed_registration_bonus: {{ $settings->allowed_registration_bonus ?? 0 }},
registration_bonus_amount: {{ $settings->registration_bonus_amount ?? 0 }},
isCreatedMeteredPlan: {{ $plan->exists() ? 1 : 0 }},
meteredPlanId: '{{ $plan->exists() ? $plan->first()->id : null }}',
// Payments
allowed_payments: {{ $settings->allowed_payments ?? 0 }},