generated from filamentphp/plugin-skeleton
-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ee5c48
commit 8e0949f
Showing
3 changed files
with
108 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace JaOcero\FilaChat\Events; | ||
|
||
use Illuminate\Broadcasting\Channel; | ||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
class FilaChatUserTypingEvent implements ShouldBroadcastNow | ||
{ | ||
use Dispatchable; | ||
use InteractsWithSockets; | ||
use SerializesModels; | ||
|
||
public string $type = FilaChatUserTypingEvent::class; | ||
|
||
/** | ||
* Create a new event instance. | ||
*/ | ||
public function __construct( | ||
public int $conversationId, | ||
public bool $isTyping, | ||
public int $receiverId, | ||
) {} | ||
|
||
/** | ||
* Get the channels the event should broadcast on. | ||
* | ||
* @return Channel | ||
*/ | ||
public function broadcastOn() | ||
{ | ||
return new Channel('filachat'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters