DashX SDK for PHP (Experimental)
# include composer autoload
require 'vendor/autoload.php';
# import the DashX Client Class
use Dashx\Php\Client;
# create DashX instance
$dashx = new Client(
'DASHX_PUBLIC_KEY',
'DASHX_PRIVATE_KEY',
'DASHX_TARGET_ENVIRONMENT',
'DASHX_URI'
);
$dashx->deliver('email/forgot-password', [
'to' => 'youremail@example.com',
'data' => [
'token' => 'tokenvalue'
// ... rest of data payload
]
]);
To integrate DashX with Laravel, run the following artisan command to publish the configuration file:
php artisan vendor:publish --provider="Dashx\Php\Laravel\DashxServiceProvider"
Add DashX environment variables with values:
DASHX_URI=
DASHX_PUBLIC_KEY=
DASHX_PRIVATE_KEY=
DASHX_TARGET_ENVIROMENT=
use DashX;
DashX::deliver('email/forgot-password', [
'to' => 'youremail@example.com',
'data' => [
'token' => 'tokenvalue'
// ... rest of data payload
]
]);