mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
refactoring
This commit is contained in:
21
app/Listeners/BroadcastListener.php
Normal file
21
app/Listeners/BroadcastListener.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?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));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user