demo realtime chat and broadcasting message with Laravel Echo
PHP HTML Vue JavaScript Other
Latest commit fdd35b3 Jan 12, 2017 @takayukii Fix readme.md
Permalink
Failed to load latest commit information.
app Fix code style and readme.md Dec 2, 2016
bootstrap Initial commit: laravel new + modified .gitignore Dec 2, 2016
config
database
env Dockerized Jan 12, 2017
public Initial commit: laravel new + modified .gitignore Dec 2, 2016
resources Dockerized Jan 12, 2017
routes
storage Initial commit: laravel new + modified .gitignore Dec 2, 2016
tests Initial commit: laravel new + modified .gitignore Dec 2, 2016
.env Dockerized Jan 12, 2017
.env.example Initial commit: laravel new + modified .gitignore Dec 2, 2016
.gitattributes Initial commit: laravel new + modified .gitignore Dec 2, 2016
.gitignore Initial commit: laravel new + modified .gitignore Dec 2, 2016
artisan Initial commit: laravel new + modified .gitignore Dec 2, 2016
composer.json Implemented private channel with socket.io Dec 2, 2016
composer.lock Implemented private channel with socket.io Dec 2, 2016
docker-compose.yml Dockerized Jan 12, 2017
gulpfile.js Initial commit: laravel new + modified .gitignore Dec 2, 2016
laravel-echo-server.json Dockerized Jan 12, 2017
package.json Implemented private channel with socket.io Dec 2, 2016
phpunit.xml
readme.md Fix readme.md Jan 12, 2017
server.php
setup.sh Dockerized Jan 12, 2017

readme.md

Laravel Echo Chat Sample

This is sample chat app using Laravel Echo and Laravel Echo Server.

With Laravel Echo and Laravel Echo Server, both realtime private message and broadcast message can be implemented very easily. Programming in Node.js is not needed.

Prerequisites

  • Docker

How to run app

Clone and run

$ git clone https://github.com/takayukii/example-Laravelchat-Echo-Socket.io
$ cd example-Laravelchat-Echo-Socket.io
$ docker-compose up

Then execute bash setup.sh or run following commands step by step.

Install libraries

$ docker-compose run app composer install
$ docker-compose run node npm install

Migration

$ docker-compose run app php artisan migrate:refresh --seed

Precompile assets

$ docker-compose run node gulp

Demo

  1. Open http://localhost/home
  2. Login (see database/seeds/UsersTableSeeder.php)
  3. Test chat
  4. Test broadcast message (php artisan websocket:news hogehoge)

YouTube