PHP code example of teamzac / openzac-api-php

1. Go to this page and download the library: Download teamzac/openzac-api-php 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/ */

    

teamzac / openzac-api-php example snippets


$apiToken = 'YOUR_TOKEN';
$client = new TeamZac\OpenZac\OpenZac($apiToken);

TeamZac\OpenZac\OpenZacServiceProvider::class,

'token' => 'YOUR_TOKEN'

app('OpenZac');

app('OpenZac')->get('entities/austin-texas');

app('OpenZac')->get('sales-tax/collections/2016/11', [
    'page' => 2,
    'take' => 25
]);

app('OpenZac')->entities;

app('OpenZac')->entities->all(['page' => 3]);

app('OpenZac')->entities->find('austin-texas');

$austin = app('OpenZac')->entities->find('austin-texas');
$austin->name;
// prints 'Austin'
cl
$ php artisan vendor:publish --provider="TeamZac\OpenZac\OpenZacServiceProvider"