Laravel implementation of Twilio Chat
Run the application
Clone the repository and
Install the application's dependencies with Composer
Copy the sample configuration file and edit it to match your configuration
cp .env.example .env
TWILIO_CHAT_SERVICE_SID you can click here,
where you must create a Programmable Chat Service. When the service is created you'll
have access to the service's SID.
php artisan key:generate
Run the application using Artisan
php artisan serve
Now you can access the application at
Expose your localhost to the internet
If you want your chat application to be reachable publicly in the internet, you can use a service like ngrok.
Expose the application to the wider Internet
ngrok http 8000
artisan serve default behavior to use
running the application. This means that the ip addresses where your app will be
reachable on you local machine will vary depending on the operating system.
The most common scenario, is that your app will be reachable through address
http://127.0.0.1:8000, and this is important because ngrok creates the
tunnel using only that address. So, if
http://127.0.0.1:8000 is not reachable
in your local machine when you run the app, you must tell artisan to use an
address, like this:
php artisan serve --host=127.0.0.1
This application uses this Twilio helper library
Run the tests
Run at the top-level directory
If you don't have phpunit installed on your system, you can follow these instructions to install it.
cd public && npm install && npm test