Mahmoud Al-HabashOpen to new projects
  • WorkWork
  • ServicesServices
  • LabLab
  • WritingWriting
  • ContactContact
Amman--:--عربي
Writing/Livewire

The stream() Method Changes in Livewire v4

Updated parameter order for streaming content.

1 February 20261 min readLivewireاقرأ بالعربية

On this page

  1. Before (v3)
  2. After (v4)
  3. Key Changes

The stream() method parameter order has changed in Livewire v4.

Before (v3)

php
$this->stream(
    to: '#container', 
    content: 'Hello', 
    replace: true
);

After (v4)

php
$this->stream(
    content: 'Hello', 
    replace: true, 
    el: '#container'
);

// Or positional
$this->stream('Hello', el: '#container');

Key Changes

- 'to:' renamed to 'el:'
- Content is now first parameter
- More intuitive API
All articles

Keep reading

  • Authorization in Livewire v4 Components1 February 20261 min read
  • Blaze Pre-Compiler: Massive Performance Gains in Livewire v41 February 20261 min read
  • Building a Bookmark Feature with Livewire v41 February 20261 min read