Beautiful Open-Source Form Builder
Fix domain limit count caching
Julien Nahum77ff8637b3f0
diff --git a/app/Models/License.php b/app/Models/License.phpindex 87252eb33..0e087c346 100644--- a/app/Models/License.php+++ b/app/Models/License.php@@ -34,7 +34,7 @@ class License extends Modelreturn $query->where('status', self::STATUS_ACTIVE);}- public function getMaxFileSizeAttribute()+ public function getMaxFileSizeAttribute(): int{return [1 => 25000000, // 25 MB,@@ -43,7 +43,7 @@ class License extends Model][$this->meta['tier']];}- public function getCustomDomainLimitCountAttribute()+ public function getCustomDomainLimitCountAttribute(): ?int{return [1 => 1,diff --git a/app/Models/Workspace.php b/app/Models/Workspace.phpindex f97f4a5f3..6543dc968 100644--- a/app/Models/Workspace.php+++ b/app/Models/Workspace.php@@ -2,7 +2,6 @@namespace App\Models;-use App\Http\Requests\AnswerFormRequest;use App\Models\Forms\Form;use App\Models\Traits\CachableAttributes;use App\Models\Traits\CachesAttributes;@@ -71,7 +70,7 @@ class Workspace extends Model implements CachableAttributesreturn null;}- return $this->remember('custom_domain_count', 15 * 60, function(): int {+ return $this->remember('custom_domain_count', 15 * 60, function(): ?int {foreach ($this->owners as $owner) {if ($owner->is_subscribed) {if ($license = $owner->activeLicense()) {