12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?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;
- /**
- * 72小时活动匹配成功
- * Class PairSuccess
- * @package App\Events
- */
- class PairSuccess
- {
- use Dispatchable;
- use InteractsWithSockets;
- use SerializesModels;
- public $uid;
- public $pairUid;
- /**
- * Create a new event instance.
- *
- * @param int $uid 用户1
- * @param int $pairUid 匹配用户
- */
- public function __construct(int $uid, int $pairUid)
- {
- $this->uid = $uid;
- $this->pairUid = $pairUid;
- }
- /**
- * Get the channels the event should broadcast on.
- *
- * @return \Illuminate\Broadcasting\Channel|array
- */
- public function broadcastOn()
- {
- return new PrivateChannel('channel-name');
- }
- }
|