HelloDialog API connector / handler package.
This package is no longer supported!
Please contact HelloDialog directly if you wish to make HelloDialog API connections.
Via Composer
$ composer require czim/hellodialog
Then add the service provider in config/app.php
:
Czim\HelloDialog\HelloDialogServiceProvider::class,
Finally publish the config using the artisan command:
$ php artisan vendor:publish
Set the configuration in config/hellodialog.php
.
After installation and configuration, the HelloDialogHandler
will be available to make custom calls to HelloDialog. The hellodialog
mail driver is also available.
See the hellodialog.php
config file for further details about configuring and using the mail driver.
Note that you cannot use all mail properties using this driver (BCC does not work, for instance).
As always with HelloDialog, sending to multiple addresses will result in multiple calls to the HelloDialog API and will be mailed separately.
When using the mail driver, a transactional template is expected with at least a 'content' replace, and optionally a 'title' replace. The placeholder for these may be set in the config (defaults to __CONTENT__
). The entire mail view contents will be used as the 'content' replace value.
To manually perform calls, instantiate the HelloDialogHandler
class.
$handler = app(\Czim\HelloDialog\Contracts\HelloDialogHandlerInterface::class);
// or:
$handler = new \Czim\HelloDialog\HelloDialogHandler();
Available methods are listed in the HelloDialogHandlerInterface.
Templates can be referred to by numerical ID, or the key set for their section in the config (which must have an id
property set).
By default, any logging will be done using Laravel's Log
facade.
Alternatively, you may pass in a custom Monolog logger (anything that implements Psr\Log\LoggerInterface
) when instantiating the HelloDialogHandler
.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.