creso/laravel-easyoffice-api is a Laravel package for laravel easyoffice api wrapper.
It currently has 0 GitHub stars and 31 downloads on Packagist (latest version 0.0.2).
Install it with composer require creso/laravel-easyoffice-api.
Discover more Laravel packages by creso
or browse all Laravel packages to compare alternatives.
Last updated
Laravel wrapper around the EasyOffice API.
You can install the package via composer:
composer require creso/laravel-easyoffice-api
You can publish the config file with:
php artisan vendor:publish --tag="easyoffice-api-config"
This is the contents of the published config file:
return [
/**
* The base url of the EasyOffice API.
*/
'base_url' => env('EASY_OFFICE_API_BASE_URL'),
/**
* The API token to authenticate with the EasyOffice API.
*/
'api_token' => env('EASY_OFFICE_API_TOKENS'),
/**
* Enable or disable api response cache. (not used yet)
*/
'enable_cache' => env('EASY_OFFICE_ENABLE_CACHE'),
/**
* The cache lifetime of an api response in seconds. (not used yet)
*
* This will only be used in case no specific cache lifetime is configured for the api type
* in the config setting below.
*/
'default_cache_liftime' => 60 * 60, // 1h
/**
* The cache lifetime of an api response in seconds for a given api type. (not used yet)
*/
'cache_lifetime' => [
'webcontentParts' => 60 * 60 * 24, // 24h
],
];
# Using the facade
EasyOfficeApi::webcontentParts()->all();
# Dependency injection
use Creso\LaravelEasyofficeApi\EasyofficeApi;
class MyClass
{
public function __construct(private EasyofficeApi $easyofficeApi)
{
}
public function __invoke()
{
$this->easyofficeApi->webcontentParts()->all();
}
}
# Using the Laravel app helper
use Creso\LaravelEasyofficeApi\EasyofficeApi;
app(EasyofficeApi::class)->webcontentParts()->all();
# Get all webcontent parts
EasyOfficeApi::webcontentParts()->all();
# Get all webcontents parts, but filterd by uuid
EasyOfficeApi::webcontentParts()->all(['uuid' => 'a-full-or-partial-uuid-to-filter-on']);
# A specific webcontent part by uuid
EasyOfficeApi::webcontentParts()->get('729bc31d-ab1b-4cfb-9dab-b5419bdc92ca');
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.