Category : ratchet

The title is confusing. Basically, I’m unable to access Laravel’s utilities in classes that don’t belong to the framework. Error is: Call to a member function connection() on null in C:xampphtdocsblazocketvendorlaravelframeworksrcIlluminateDatabas eEloquentModel.php:1571 I have a Websocket Server based on Ratchet library, it has the following strucutre: $server = new RatchetApp(‘localhost’, 8080); $server->route(‘/api/socket’, new WebSocketHandler, array(‘*’)); ..

Read more

I want to send data to ratchet via class in php to send it to client send data through JavaScript var conn = new WebSocket(‘ws://localhost:6001/’); conn.onmessage = function(e) { console.log(e.data); }; conn.onopen = function(e) { conn.send(‘Hi’); }; But I want to send data to ratchet via php for send notification How do I do this? ..

Read more