An open API service indexing awesome lists of open source software.

https://github.com/dashxhq/dashx-php

DashX SDK for PHP
https://github.com/dashxhq/dashx-php

ab-testing admin-panel analytics automation billing cms feature-flags messaging notifications php

Last synced: 6 days ago
JSON representation

DashX SDK for PHP

Awesome Lists containing this project

README

          




DashX




Your All-in-One Product Stack



Website
|
Demos
|
Documentation



# dashx-php

_DashX SDK for PHP (Experimental)_

## Installation

## Usage
```php
# 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
]
]);
```

## Integration with Laravel

To integrate DashX with Laravel, run the following artisan command to publish the configuration file:

```bash
php artisan vendor:publish --provider="Dashx\Php\Laravel\DashxServiceProvider"
```

Add DashX environment variables with values:

```bash
DASHX_URI=
DASHX_PUBLIC_KEY=
DASHX_PRIVATE_KEY=
DASHX_TARGET_ENVIROMENT=
```

## Usage with Laravel

```php
use DashX;

DashX::deliver('email/forgot-password', [
'to' => 'youremail@example.com',
'data' => [
'token' => 'tokenvalue'
// ... rest of data payload
]
]);
```