Lae/app/Events/Tasks.php

35 lines
701 B
PHP
Raw Normal View History

2023-01-10 13:42:27 +00:00
<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class Tasks
{
use Dispatchable, InteractsWithSockets, SerializesModels;
/**
* Create a new event instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the channels the event should broadcast on.
*
* @return Channel|PrivateChannel
*/
public function broadcastOn(): Channel|PrivateChannel
{
return new PrivateChannel('channel-name');
}
}