An example application implementing an automated phone line using Twilio and Laravel.
-
Clone the repository and
cdinto it. -
Install the application's dependencies with Composer
$ composer install
-
Copy
.env.exampleto.envand generate a new app key:$ cp .env.example .env $ php artisan key:generate
-
Run the application using Artisan.
$ php artisan serve
-
Expose the application to the wider Internet using ngrok
$ ngrok 8000 http
-
Provision a number under the Manage Numbers page on your account. Set the voice URL for the number to
http://<your-ngrok-subdomain>.ngrok.io/ivr/welcome. -
Grab your phone and call your newly-provisioned number!
This application uses this Twilio helper library:
Run at the top-level directory:
$ phpunit --coverage-textIf your PHP installation doesn't have xdebug support then simply run
the tests without coverage reporting
$ phpunit