vito/app/Http/Livewire/Broadcast.php
Saeed Vaziry 8bffefabef
Upgrade to Livewire 3 (#103)
* upgrade to livewire 3

* fix updater

* fix modal events

* fix modal events
2024-02-04 18:11:22 +01:00

22 lines
429 B
PHP

<?php
namespace App\Http\Livewire;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\Cache;
use Livewire\Component;
class Broadcast extends Component
{
public function render(): View
{
$event = Cache::get('broadcast');
if ($event) {
Cache::forget('broadcast');
$this->dispatch('broadcast', $event);
}
return view('livewire.broadcast');
}
}