ucfirst seems to not do its part
adzadzadz opened this issue · 4 comments
adzadzadz commented
adzadzadz commented
fixed the issue by removing the double quote since it's a json string
ucfirst(trim($command, '"'))
Consigliere-kz commented
show me your getCommand method?
You should normalize request to command name by overriding getCommand, not in onMessage method.
adzadzadz commented
protected function getCommand(ConnectionInterface $from, $msg)
{
return json_decode($msg)->action;
}
Yeah I agree. I was thinking of shortening the process where all the $msgs are commands which isn't usually the case.
Anyway, I noticed that the connection closes for the frontend wherever I try to run an activerecord query such as User::findOne() but the connection in the server side is still running. Any insight with this?