ok
Direktori : /home2/selectio/public_html/fms-worksuite/app/Events/ |
Current File : /home2/selectio/public_html/fms-worksuite/app/Events/NewMessage.php |
<?php namespace App\Events; use App\Models\UserChat; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; class NewMessage implements ShouldBroadcastNow { use Dispatchable, InteractsWithSockets, SerializesModels; public $userChat; /** * Create a new event instance. * * @return void */ public function __construct(UserChat $userChat) { $this->userChat = $userChat; } /** * Get the channels the event should broadcast on. * * @return \Illuminate\Broadcasting\Channel|array */ public function broadcastOn() { return new PrivateChannel('chat'); } }