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
- Host: GitHub
- URL: https://github.com/dashxhq/dashx-php
- Owner: dashxhq
- License: mit
- Created: 2022-07-04T09:00:19.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-24T13:58:31.000Z (over 2 years ago)
- Last Synced: 2024-04-25T12:21:48.139Z (about 2 years ago)
- Topics: ab-testing, admin-panel, analytics, automation, billing, cms, feature-flags, messaging, notifications, php
- Language: PHP
- Homepage: https://docs.dashx.com/developer
- Size: 37.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
]
]);
```