PHP code example of bfg / puller-livewire

1. Go to this page and download the library: Download bfg/puller-livewire library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bfg / puller-livewire example snippets


class OrderTracker extends Component
{
    public $showNewOrderNotification = false;
 
    // Special Syntax: ['puller:{event}' => '{method}']
    protected $listeners = ['puller:livewire_event_name' => 'notifyNewOrder'];
 
    public function notifyNewOrder()
    {
        $this->showNewOrderNotification = true;
    }
}
bash
php artisan vendor:publish --tag=puller-livewire-assets