invoiceninja/app/Events/Client/ClientWasArchived.php

45 lines
971 B
PHP
Raw Normal View History

2019-04-19 18:49:14 +10:00
<?php
2019-04-19 19:09:55 +10:00
namespace App\Events\Client;
2019-04-19 18:49:14 +10:00
use App\Models\Client;
2019-04-20 08:27:37 +10:00
use Illuminate\Broadcasting\Channel;
2019-04-19 18:49:14 +10:00
use Illuminate\Queue\SerializesModels;
2019-04-20 08:27:37 +10:00
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
2019-04-19 18:49:14 +10:00
/**
* Class ClientWasArchived.
*/
2019-04-20 08:27:37 +10:00
class ClientWasArchived
2019-04-19 18:49:14 +10:00
{
2019-04-20 08:27:37 +10:00
use Dispatchable, InteractsWithSockets, SerializesModels;
2019-04-19 18:49:14 +10:00
/**
* @var Client
*/
public $client;
/**
* Create a new event instance.
*
* @param Client $client
*/
public function __construct(Client $client)
{
$this->client = $client;
}
2019-04-20 08:27:37 +10:00
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
*/
public function broadcastOn()
{
return new PrivateChannel('channel-name');
}
2019-04-19 18:49:14 +10:00
}