basically, you must implement a chat server and chat client, which both connect by socket(websocket)...
do you want login via ajax request? or you just want echo json format to html? i don't get it, or ?...
i think you should add ext of mcrypt at php-fpm/php.ini, or you just: <?php echo phpinfo();...
The Laravel portal for problem solving, knowledge sharing and community building.
The community