creer($instanceId, 'ecriture'); } public function pourLecture(string $instanceId): string { return $this->creer($instanceId, 'lecture'); } private function creer(string $instanceId, string $role): string { $jeton = Str::random(40); $url = $this->nova->consoleSerielle($instanceId); Redis::setex( "console:{$jeton}", self::DUREE_MINUTES * 60, json_encode([ 'url' => $url, 'instance_id' => $instanceId, 'role' => $role, ]), ); return $jeton; } }