⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
15.204.235.159
Server:
Linux srv.techlup.co.ke 4.18.0-553.5.1.el8_10.x86_64 #1 SMP Wed Jun 5 09:12:13 EDT 2024 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
tech
/
rider.techlup.co.ke
/
admin
/
app
/
Events
/
Edit File: SendMessage.php
<?php namespace App\Events; use Illuminate\Broadcasting\Channel; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Broadcasting\PrivateChannel; use Illuminate\Contracts\Broadcasting\ShouldBroadcast; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; class SendMessage implements ShouldBroadcast { use Dispatchable, InteractsWithSockets, SerializesModels; public readonly array $data; // this will depend based on your logic /** * Create a new event instance. */ public function __construct(array $data) { $this->data = $data; } /** * Get the channels the event should broadcast on. * * @return array<int, \Illuminate\Broadcasting\Channel> */ public function broadcastOn(): PrivateChannel|array { return new PrivateChannel('message'); } public function broadcastAs() { return "client-message"; } }
Simpan