Download the PHP package manthan/nuncio without Composer
On this page you can find all versions of the php package manthan/nuncio. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download manthan/nuncio
More information about manthan/nuncio
Files in manthan/nuncio
Package nuncio
Short Description Turn your customer messages/emails into mustache-style templates. Just create one template for your message and nuncio will replace tags with customer details.
License MIT
Informations about the package nuncio
Nuncio
Nuncio is a flexible and customizable messenger that helps you turn your SMS/Email into mustache-style templates.
Installing
You can install Nuncio using Composer.
{
"require": {
"manthan/nuncio": "1.1.*"
}
}
Basic Usage
Using Nuncio is as simple as extending Manthan\Nuncio\Nuncio and specifying Keywords that you'd want in your message templates to be replaced.
For example, you'd like to notify your users via SMS using following template in your dashboard:
Hello {{name}}, Your fees ${{fees}} are pending.
To process this message this is what you'd do:
Looks very simple, right?
Now to use this newly created notifier do the following:
The code above, sends following message to the number 78787878:
Hello Manthan, your fees $1500 are pending.
Nuncio is super flexible. As shown above, you can use any of your Message Service Implementations (may it be Twilio, Plivo or Email Notifiers) to send your processed messages.
Changing the number field
As you can see in the above example, Nuncio by default looks for the property 'number' on each of the recepients and sends message to that number.
But it is highly probable that you're not using number property in your User objects. In which case, you can change the default number field like so:
Running Tests
You can run the tests using :
./vendor/bin/phpunit