*/ public array $references = []; #[Locked] public ?string $resourceableType = null; #[Locked] public ?int $resourceableId = null; public function mount() { $this->key = $this->env['key']; $this->value = $this->env['value'] ?? null; $this->isValueHidden = $this->env['is_value_hidden'] ?? true; $this->comment = $this->env['comment'] ?? null; $this->serviceName = $this->env['service_name'] ?? null; $this->composeType = $this->env['compose_type'] ?? 'literal'; $this->references = $this->env['references'] ?? []; } public function copyValue(): ?string { $environmentVariable = EnvironmentVariable::make([ 'value' => $this->value, 'is_preview' => $this->isPreview, 'resourceable_type' => $this->resourceableType, 'resourceable_id' => $this->resourceableId, ]); $resource = $environmentVariable->resourceable; if (! $resource || auth()->user()->cannot('update', $resource)) { return null; } return $environmentVariable->resolveReferencedValue(); } public function render() { return view('livewire.project.shared.environment-variable.show-hardcoded'); } }