. */ declare(strict_types=1); namespace FireflyIII\Events; use Illuminate\Broadcasting\Channel; 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 * * @codeCoverageIgnore */ class RequestedReportOnJournals { use Dispatchable, InteractsWithSockets, SerializesModels; /** @var Collection The transaction groups to report on. */ public $groups; /** @var int The ID of the user. */ public $userId; /** * Create a new event instance. * * @param int $userId * @param Collection $groups */ public function __construct(int $userId, Collection $groups) { Log::debug('In event RequestedReportOnJournals.'); $this->userId = $userId; $this->groups = $groups; } /** * Get the channels the event should broadcast on. * * @return Channel|array */ public function broadcastOn() { return new PrivateChannel('channel-name'); } }