Realtime chat application built with Laravel WebSockets.
- Clone this repository git clone [email protected]:300code/Laravel-WebSockets-Chat-Typing-Features.git
- composer install
- php artisan key:generate
- cp .env.example .env and configure your database in .env file.
- Run migration to create tables in database. php artisan migrate
- Final step run websockets server. php artisan websockets:serve,
you can add this channel on route for sending packet to socket as typing user ....
Broadcast::channel('events.{userId}', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});