PHP code example of hyperized / wefact

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

    

hyperized / wefact example snippets


Hyperized\Hostfact\HostfactServiceProvider::class,

'Hostfact'    => Hyperized\Hostfact\HostfactServiceProvider::class,

// config/Hostfact.php
'api_v2_url'		=> env('HOSTFACT_URL', 'https://yoursite.tld/Pro/apiv2/api.php'),
'api_v2_key'		=> env('HOSTFACT_KEY', 'token'),
'api_v2_timeout'	=> env('HOSTFACT_TIMEOUT', 20),

// .env/.env.example
HOSTFACT_URL=https://yoursite.tld/Pro/apiv2/api.php
HOSTFACT_KEY=token
HOSTFACT_TIMEOUT=20

use \Hyperized\Hostfact\Api\Controllers\Product;

$products = Product::new()
                ->list([
                    'searchfor' => 'invoice'
                ]);
bash
php artisan vendor:publish --provider="Hyperized\Hostfact\HostfactServiceProvider" --tag="config"