Route requests to Laravel Controller to running WebSocket server

Solution:

The answer here appears to be that I need to create a WebSocket client in PHP that will send messages to the WebSocket server, the same as a client written in JavaScript would. For any interested viewers struggling with the same issue, I was able to find a few WebSocket Clients written in PHP:

  1. https://github.com/gabrielbull/php-websocket-client
  2. https://github.com/Devristo/phpws
  3. https://github.com/symbiose/php-websocket-client (<– This is the one I wound up going with)

I’ll be leaving this question open for awhile in case anyone comes up with a different idea / better client library to use.