This is a laravel-echo-server usage example on Laravel Todo List project. Implementing Todolist-Vue-Laravel-Pusher tutorial with Laravel Echo Server package.
This requirements and installation steps are working on Ubuntu 16.04 or Linux Mint 18.3.
To make this repo works as expected, we are need this requirements installed:
- Laravel Valet (I use Valet Linux)
- Laravel Echo Server
- Redis Server (
sudo apt install redis-server
)
- Clone this repo.
$ git clone git@github.com:nafiesl/laravel-echo-server-example.git
$ cd laravel-echo-server-example
$ composer install
$ cp .env.example .env
- Set
BROADCAST_DRIVER=redis
and database config on.env
$ php artisan key:generate
$ php artisan migrate
$ valet link
$ valet secure
$ valet links
See this site hasX
on SSL column.$ cp laravel-echo-server.json-example laravel-echo-server.json
- Update your
laravel-echo-server.json
file:- Set "authHost": "https://laravel-echo-server-example.test",
- Set "sslCertPath": "/home/yourusername/.valet/Certificates/laravel-echo-server-example.test.crt",
- Set "sslKeyPath": "/home/yourusername/.valet/Certificates/laravel-echo-server-example.test.key",
$ laravel-echo-server start
- Open
https://laravel-echo-server-example.test
with separated browser window. - Fill the form to add new task, or delete the existing task, we should see both task list got same reaction on user actions.
Please use and re-use however you want.