This project was created to verify if:
- Websocket can be used in a regular Laravel app
- Socket.io (Node) can be used as a replacement for Pusher
- Laravel Broadcasting documentation can be used as is
- Check if websocket communication is compatible with the current authentication setup
-
Laravel 10.x (php 8.1)
-
composer: laravel/sail
(optional) configure a ready-to-go environment
# add sail as shell command
alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
composer install
sail up -d
sail npm install
sail npm run build
-> build client resources (where messages/notifications are received)- Open your browser on http://localhost
sail artisan chat:public-message
-> send public messages to any subscribed client