PHP code example of stickee / sync
1. Go to this page and download the library: Download stickee/sync 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/ */
stickee / sync example snippets
Route::middleware('auth:api')
->prefix('sync')
->name('sync.')
->group(function () {
\Stickee\Sync\ServiceProvider::routes();
});
app()->when(\Stickee\Sync\Client::class)
->needs(\GuzzleHttp\Client::class)
->give(function () {
$config = [
'headers' => [
'Authorization' => 'Bearer ' . \Stickee\Sync\Helpers::clientConfig('api_key'),
'Accept' => 'application/json',
],
];
return new \GuzzleHttp\Client($config);
});