36 lines
712 B
PHP
36 lines
712 B
PHP
<?php
|
|
|
|
namespace App\Events;
|
|
|
|
use App\Models\ProjectReport;
|
|
use Illuminate\Broadcasting\PrivateChannel;
|
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class ReportUpdated implements ShouldBroadcastNow
|
|
{
|
|
use SerializesModels;
|
|
|
|
/**
|
|
* Create a new event instance.
|
|
*/
|
|
public function __construct(
|
|
public ProjectReport $ProjectReport
|
|
)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Get the channels the event should broadcast on.
|
|
*
|
|
* @return array<int, \Illuminate\Broadcasting\Channel>
|
|
*/
|
|
public function broadcastOn(): array
|
|
{
|
|
return [
|
|
new PrivateChannel('reports-channel'),
|
|
];
|
|
}
|
|
}
|