firefly-iii/app/Events/RequestedReportOnJournals.php
2018-06-28 06:31:31 +02:00

47 lines
1.0 KiB
PHP

<?php
namespace FireflyIII\Events;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Collection;
use Log;
/**
* Class RequestedReportOnJournals
*/
class RequestedReportOnJournals
{
use Dispatchable, InteractsWithSockets, SerializesModels;
/** @var Collection */
public $journals;
/** @var int */
public $userId;
/**
* Create a new event instance.
*
* @param int $userId
* @param Collection $journals
*/
public function __construct(int $userId, Collection $journals)
{
Log::debug('In event RequestedReportOnJournals.');
$this->userId = $userId;
$this->journals = $journals;
}
/**
* Get the channels the event should broadcast on.
*
* @return \Illuminate\Broadcasting\Channel|array
*/
public function broadcastOn()
{
return new PrivateChannel('channel-name');
}
}