Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sameed_editz's avatar

using wire:stream to stream output real time in livewire but not working idk why?

my livewire component

blade view

<div class="row mb-3">
        <div class="col-md-12">
            <div class="card bg-dark text-white">
                <div class="card-header">
                    Script Output
                </div>
                <div class="card-body" wire:stream="output">
                    <pre id="script-output" style="height: 300px; overflow-y: auto; white-space: pre-wrap;">
                        {{ $output }}
                    </pre>
                </div>
            </div>
        </div>
    </div>

how could i stream this output in real time

$this->appendOutput("Executing script on server {$this->server->ip_address}...\n");
            $this->appendOutput("Connected successfully via SFTP!\n");
            $this->appendOutput("Uploading setup script...\n");

private function appendOutput($text)
    {
        $this->stream(to: 'output', content: $text);
    }

any help would be appreciated.

0 likes
0 replies

Please or to participate in this conversation.