I am trying to publish stuff to redis but I get this error:
Call to a member function publish() on null.
Not sure whats going on. This is my code. Works well on the local environment but on the server the above error message shows. I have the following code in a controller. The website is hosted on windows azure appservice. I have also installed the predis/predis dependency.
$redis = Redis::connection(6380)->publish('test-channel', json_encode(['foo' => 'bar']));
Am I not connecting to redis or something?