1. Go to this page and download the library: Download nrshoukhin/forte-php-sdk 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/ */
houkhin\Forte\Api\Authentication;
use Shoukhin\Forte\Api\Customer;
$access_id = "provide your Forte access ID";
$secret_id = "provide your Forte secret ID";
$authentication = new Authentication( $access_id, $secret_id );
$authentication->set_config(
array(
"mode" => "sandbox", //sandbox or live
"org_id" => "provide the organization ID",
"loc_id" => "provide the location ID"
)
);
$forte = new Customer($authentication);
$customer = $forte->getCustomerOfOrganization();
echo "<pre>";
var_dump( $customer );
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Shoukhin\Forte\Facades\Forte;
class ForteController extends Controller
{
public function getAllCustomers(){
$data = Forte::Customer()->getCustomerOfOrganization();
echo "<pre>";
var_dump( $data );
return;
}
}