For communicating with the Simplicate API.
W.I.P.
Laravel | Package |
---|---|
5.3.x and older | 0.9.x |
Via Composer:
$ composer require czim/laravel-simplicate
If you don't use auto-discover, register the Service Provider in your config/app.php
:
<?php
'providers' => [
// ...
Czim\Simplicate\Providers\SimplicateServiceProvider::class,
],
Publish the configuration file:
php artisan vendor:publish --provider="Czim\Simplicate\Providers\SimplicateServiceProvider"
Set up your .env
file for the following values:
SIMPLICATE_DOMAIN=yoursimplicatesubdomain
SIMPLICATE_API_KEY=yoursimplicateapikey
SIMPLICATE_API_SECRET=yoursimplicateapisecret
To Do.
For filterable, orderable listings, you can use fluent syntax to set parameters:
<?php
/** @var \Czim\Simplicate\Services\SimplicateService $service */
$leaveRecords = $service->hrm()
->offset(2)
->limit(10)
->sort('start_date')->descending()
->filter(['employee.id' => 'employee:aa24f3857730be716d44e34a3f0f8c3a'])
->allLeave();
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.