*/ protected function casts(): array { return [ 'website_type_extra_id' => 'integer', 'config' => 'array', 'is_enabled' => 'boolean', ]; } /** * @return BelongsTo */ public function website(): BelongsTo { return $this->belongsTo(Tenant::class, 'website_code', 'codigo'); } /** * @return BelongsTo */ public function websiteTypeExtra(): BelongsTo { return $this->belongsTo(WebsiteTypeExtra::class, 'website_type_extra_id'); } public function setResolvedConfig(mixed $config): self { $this->resolvedConfig = $config; $this->hasResolvedConfig = true; return $this; } public function resolvedConfig(): mixed { return $this->hasResolvedConfig ? $this->resolvedConfig : $this->config; } }