In this scenario, it would be best to create a separate Laravel-Websockets project that will handle the multi-tenancy instead of inside one of the projects. This approach will allow you to have a centralized location for managing your websockets server, and it will be easier to scale in the future if more projects need to use it.
To set up a separate Laravel-Websockets project, you can follow the installation instructions provided in the Laravel-Websockets documentation. Once you have the server up and running, you can configure your other projects to use it by updating the BROADCAST_DRIVER setting in your .env file to pusher, and then configuring the PUSHER_APP_ID, PUSHER_APP_KEY, and PUSHER_APP_SECRET settings to match the values for your Laravel-Websockets server.
Here's an example of how you can configure your .env file to use a separate Laravel-Websockets server:
BROADCAST_DRIVER=pusher
PUSHER_APP_ID=your-app-id
PUSHER_APP_KEY=your-app-key
PUSHER_APP_SECRET=your-app-secret
PUSHER_APP_CLUSTER=mt1
PUSHER_HOST=your-websockets-server-host
PUSHER_PORT=6001
PUSHER_SCHEME=http
Note that you'll need to replace the your-app-id, your-app-key, and your-app-secret values with the appropriate values for your Laravel-Websockets server, and update the your-websockets-server-host value to match the hostname or IP address of your server.
By using a separate Laravel-Websockets project, you'll be able to easily manage your websockets server and scale it as needed in the future.