123456789101112131415161718192021222324252627282930313233343536 |
- <?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 ThreadCreated
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- public $thread;
- /**
- * Create a new event instance.
- */
- public function __construct($thread)
- {
- $this->thread = $thread;
- }
- /**
- * Get the channels the event should broadcast on.
- *
- * @return Channel|array
- */
- public function broadcastOn()
- {
- return new PrivateChannel('channel-name');
- }
- }
|