I didn't see this new functionality, I will test it today and I tell you something.
Dec 15, 2024
13
Level 1
wire:stream not work.
I'm using the same example from the wire:stream documentation, but the count is not displayed in descending order, it simply 'freezes' and after 3 seconds the final result appears. The request is frozen, what could it be?
i use laragon, redis, php 8.3.
all in latest versions..
public $start = 3;
public function begin()
{
while ($this->start >= 0) {
// Stream the current count to the browser...
$this->stream(
to: 'count',
content: $this->start,
replace: true,
);
// Pause for 1 second between numbers...
sleep(1);
// Decrement the counter...
$this->start = $this->start - 1;
};
}
public function render()
{
return <<<'HTML'
<div>
<button wire:click="begin">Start count-down</button>
<h1>Count: <span wire:stream="count">{{ $start }}</span></h1>
</div>
HTML;
}
Level 1
the problem was with apache, with nginx it worked correctly.
1 like
Please or to participate in this conversation.