<?php

namespace App\Events;

use App\WaybillPriceModel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;

class WaybillPriceModelEvent
{
    use  SerializesModels;

    public $waybillPriceModel;

    /**
     * Create a new event instance.
     *
     * @param WaybillPriceModel $waybillPriceModel
     *
     * @return void
     */
    public function __construct(WaybillPriceModel $waybillPriceModel)
    {
        $this->waybillPriceModel=$waybillPriceModel;
    }

    /**
     * Get the channels the event should broadcast on.
     *
     * @return \Illuminate\Broadcasting\Channel|array
     */
    public function broadcastOn()
    {
        return new PrivateChannel('channel-name');
    }
}
