bfg / puller-livewire
A description for puller-livewire.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 0
Type:package
Requires
- bfg/puller: 2.*
- livewire/livewire: ^2.8
This package is auto-updated.
Last update: 2024-10-29 06:19:18 UTC
README
Install
composer require bfg/puller-livewire
This package is a plug-in for Puller
.
Navigate the link to read the documentation in the https://github.com/bfg-s/puller.
Usage
Make sure that in your public/vendor
folder published puller-livewire/puller-livewire.js
.
He had to appear immediately after installing the package,
as it broads publications in the laravel-assets
group.
If this did not happen and you did not appear there, publish it manually:
php artisan vendor:publish --tag=puller-livewire-assets
Connect the script in your document after Livewire initialization:
@livewireScripts() <script src="{{ asset('vendor/puller-livewire/puller-livewire.js') }}"></script>
In Livewire component make event:
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; } }
Send Create a guide class or an anonymous channel named livewire_event_name
.
Changelog
Please see CHANGELOG for more information what has changed recently.
Credits
Security
If you discover any security-related issues, please email xsaven@gmail.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.