<?php

namespace App\Events;

use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Broadcasting\PrivateChannel;
use Illuminate\Broadcasting\PresenceChannel;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;

/**
 * 取消相互心动事件
 * Class UnEachLike
 * @package App\Events
 */
class UnEachLike
{
    use Dispatchable;
    use InteractsWithSockets;
    use SerializesModels;

    public $uid;
    public $unLikeUid;

    /**
     * Create a new event instance.
     *
     * @param  int  $uid
     * @param  int  $unLikeUid
     */
    public function __construct(int $uid, int $unLikeUid)
    {
        $this->uid = $uid;
        $this->unLikeUid = $unLikeUid;
    }

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