Use Twilio to create sms notifications to keep your subscribers in the loop.
-
You will need to configure Twilio to send requests to your application when SMS are received.
You will need to provision at least one Twilio number with sms capabilities so the application's users can make property reservations. You can buy a number right here. Once you have a number you need to configure your number to work with your application. Open the number management page and open a number's configuration by clicking on it.
Remember that the number where you change the SMS webhook must be the same one you set on the
TWILIO_PHONE_NUMBER
environment variable.To start using
ngrok
on our project you'll have execute to the following line in the command prompt.ngrok http 8000
Keep in mind that our endpoint is:
http://<your-ngrok-subdomain>.ngrok.io/subscribers/register
-
Clone this repository and
cd
into it.git clone git@github.com:TwilioDevEd/marketing-notifications-laravel.git cd marketing-notifications-laravel
-
Install the application's dependencies with Composer.
composer install
-
The application uses PostgreSQL as the persistence layer. If you don't have it already, you should install it. The easiest way is by using Postgres.app.
-
Create a database.
createdb marketing_notifications
-
Copy the sample configuration file and edit it to match your configuration.
cp .env.example .env
You'll need to set DB_DATABASE
, DB_USERNAME
, DB_PASSWORD
, TWILIO_ACCOUNT_SID
, TWILIO_AUTH_TOKEN
, and TWILIO_PHONE_NUMBER
in your .env file.
-
Generate an
APP_KEY
.php artisan key:generate
-
Run the migrations.
php artisan migrate
-
Run the application using Artisan.
php artisan serve
-
Check it out at http://localhost:8000
-
Create a database.
createdb marketing_notifications_test
-
Run the database migrations for the test database.
APP_ENV=testing php artisan migrate
-
Run at the top-level directory.
phpunit
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.