mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-22 03:02:20 +00:00
22 lines
376 B
PHP
22 lines
376 B
PHP
<?php
|
|
|
|
namespace App\Listeners;
|
|
|
|
use App\Events\Broadcast;
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
class BroadcastListener
|
|
{
|
|
public function __construct()
|
|
{
|
|
}
|
|
|
|
public function handle(Broadcast $event): void
|
|
{
|
|
Cache::set('broadcast', [
|
|
'type' => $event->type,
|
|
'data' => $event->data,
|
|
], now()->addMinutes(5));
|
|
}
|
|
}
|