This commit is contained in:
Saeed Vaziry
2023-07-02 12:47:50 +02:00
commit 5c72f12490
825 changed files with 41659 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<?php
namespace App\Traits;
trait RefreshComponentOnBroadcast
{
public function getListeners(): array
{
return [
'echo-private:app,Broadcast' => 'refreshComponent',
'refreshComponent' => '$refresh',
'$refresh',
];
}
public function refreshComponent(array $data): void
{
$this->emit('refreshComponent');
}
}