PHP code example of baorv / l5-klaviyo

1. Go to this page and download the library: Download baorv/l5-klaviyo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

baorv / l5-klaviyo example snippets


"    "baorv/l5-klaviyo": "dev-master"
}

'providers' => [
    \Baorv\Klaviyo\KlaviyoServiceProvider::class,
]

php artisan vendor:publish

KLAVIYO_API_KEY={your-api-key}
KLAVIYO_PUBLIC_KEY={your-public-key}

$campaignApi = app(Secomapp\Klaviyo\Resources\Campaign::class);
$campaignApi->all();

try{
    $campaign = app(\Baorv\Klaviyo\Resources\Campaign::class);
    $campaign->all();
}catch (\Baorv\Klaviyo\Exceptions\KlaviyoApiException $exception) {
    $exception->getMessage();
}