PHP code example of katalam / laravel-onoffice-adapter
1. Go to this page and download the library: Download katalam/laravel-onoffice-adapter 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/ */
katalam / laravel-onoffice-adapter example snippets
return [
/**
* The base URL of the OnOffice API.
* Change that if you are using a different version of the API.
*/
'base_url' => 'https://api.onoffice.de/api/stable/api.php',
/**
* The headers to be sent with the request.
* Override this if you need to send additional headers.
*/
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
/**
* Retry
*/
'retry' => [
'count' => 3,
'delay' => 200,
'only_on_connection_error' => true,
],
/**
* The token and secret to be used for authentication with the OnOffice API.
*/
'token' => env('ON_OFFICE_TOKEN', ''),
'secret' => env('ON_OFFICE_SECRET', ''),
];
use Innobrain\OnOfficeAdapter\Facades\EstateRepository;
use Innobrain\OnOfficeAdapter\Services\OnOfficeService;
$estates = EstateRepository::query()
->select(OnOfficeService::DEFAULT_ESTATE_INFO_FIELDS)
->get();
use Innobrain\OnOfficeAdapter\Facades\EstateRepository;
use Innobrain\OnOfficeAdapter\Services\OnOfficeService;
$estates = EstateRepository::query()
->select(OnOfficeService::DEFAULT_ESTATE_INFO_FIELDS)
->get();
// will leave out fields with empty values like "", "0.00", [], or null.
$estates = clean_elements($estates);