PHP code example of codetech / laravel-vendus

1. Go to this page and download the library: Download codetech/laravel-vendus 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/ */

    

codetech / laravel-vendus example snippets


use CodeTech\Vendus\Contracts\VendusClient;
use CodeTech\Vendus\Traits\InteractsWithVendusClient;

class Customer extends Model implements VendusClient
{
    use InteractsWithVendusClient;
}

use CodeTech\Vendus\VendusResource;

$customer = Customer::find(1);

$resource = new VendusResource($customer);
$resource->sync();
ini
VENDUS_API_KEY=your-api-key