'string', 'value' => 'encrypted', ]; /** * Scope shared environment variables to a team (API token team_id). */ public static function ownedByCurrentTeamAPI(int $teamId) { return static::where('team_id', $teamId); } protected function key(): Attribute { return Attribute::make( set: fn (string $value) => ValidationPatterns::validatedEnvironmentVariableKey($value), ); } public function team() { return $this->belongsTo(Team::class); } public function project() { return $this->belongsTo(Project::class); } public function environment() { return $this->belongsTo(Environment::class); } public function server() { return $this->belongsTo(Server::class); } }