lo que queiero hacer es como mandar los mensajes a la base de datos para poder mostrarlos en la vista usando ratchet websocket . mis websocket ya los genera pero desde otro php para generarlos por medio de un boton como prueba pero como pudiera hacerlos de manera dinamica para detectar el evento y mostrarlos ?
public function pusher(){
'category' => $this->input->post('category'),
'title' => $this->input->post('title'),
'article' => $this->input->post('article'),
);
//$this->notification->addNotification($entryData);
// This is our new stuff
$context = new ZMQContext();
$socket = $context->getSocket(ZMQ::SOCKET_PUSH, 'my pusher');
$socket->connect("tcp://localhost:5555");
}
var sock = new ab.Session('ws://192.168.0.4:8080',
function() {
sock.subscribe('kittensCategory', function(topic, data) {
$badge.show();
$badge.text(parseInt($badge.text()) + 1);
$list.find(".item").eq(13).nextAll(".item").remove();
var item = '<li class="item text-warning"><a href="#"><span class="text-warning">' +
'<i class="fa fa-exclamation-triangle fa-fw"></i>'+data.title+' is low'+'</span>' +
'<span class="pull-right text-muted small" data-time="">'+data.timestamp+'</span></a></li>' +
'<li class="item divider"></li>';
$list.prepend(item);
$('.dropdown.open .dropdown-toggle').dropdown('toggle');
});
},
function() {
console.warn('WebSocket connection closed');
}, {
'skipSubprotocolCheck': true
}
);