1. Go to this page and download the library: Download herojhc/xxh-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/ */
php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
//
'serve'
];
}
php
/**
* Created by PhpStorm.
* User: JHC
* Date: 2018-07-24
* Time: 11:51
*/
namespace XinXiHua\SDK\Services;
use Illuminate\Support\Facades\Log;
use XinXiHua\SDK\Exceptions\ApiException;
class ContactService extends BaseService
{
public function all()
{
$response = $this->client->get('/contacts');
Log::info($response->getResponse());
if ($response->isResponseSuccess()) {
return $response->getResponseData()['data'];
}
throw new ApiException($response->getResponseData()['message']);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.